ho una struct:C++: Memorizzazione le strutture in una pila
struct Vehicle
{
char ad; // Arrival departure char
string license; // license value
int arrival; // arrival in military time
};
voglio per memorizzare tutti i valori nella struct in una pila.
posso archiviare un valore nello stack facendo:
stack<string> stack; // STL Stack object
Vehicle v; //vehicle struct object
stack.push(v.license);
Come posso memorizzare un tutto struct nella pila in modo da poter successivamente accedere al char, int, e, stringa?
Haha, non posso credere che fosse così semplice. Grazie! – Nick