Oppure

Loading
28/10/16 23:51
Thejuster
Salve a tutti ho un problema relativo alle liste.
pur vedendo alcuni esempi dalla rete non riesco a capire il malfunzionamento di essa.

ho una struttura

typedef struct Rows
{
    string name;
    bool primaryKey;
    Type type;
    int lenght;
    string defined;
    MyLDC::Attributes attrib;
    bool Nullable;
    Indices index;
    bool AutoIncrement;
    string comment;

};
Rows rw;
Rows* row = &rw;




Normalmente dichiarare una lista dovrebbe essere così


void MyLDC::CreateTable(string tablename,string primaryKey)
{

 list<Rows> linea;

}



Ma ho un errore proprio li nella dichiarazione

error: 'list' was not declared in this scope
error: expected primary-expression before '>' token
error: 'linea' was not declared in this scope


se provo invece a dichiarare la lista fuori dalla funzione
ho questo errore

error: 'list' does not name a type

perché ricevo questo errore?
mire.forumfree.it/ - Mire Engine
C# UI Designer
29/10/16 5:45
nessuno
Ma

#include <list>

l'hai scritto?
Ricorda che nessuno è obbligato a risponderti e che nessuno è perfetto ...
---
Il grande studioso italiano Bruno de Finetti ( uno dei padri fondatori del moderno Calcolo delle probabilità ) chiamava il gioco del Lotto Tassa sulla stupidità.
29/10/16 9:18
Thejuster
Emh lol.....

No. Perché credevo che List facesse parte di std::list

cmq grazie nessuno, errore mio sciocco.
Ultima modifica effettuata da Thejuster 29/10/16 9:20
mire.forumfree.it/ - Mire Engine
C# UI Designer
29/10/16 9:49
nessuno
Postato originariamente da Thejuster:

No. Perché credevo che List facesse parte di std::list


E infatti list fa parte di std ... ma l'include è necessario ... che dici?
Ricorda che nessuno è obbligato a risponderti e che nessuno è perfetto ...
---
Il grande studioso italiano Bruno de Finetti ( uno dei padri fondatori del moderno Calcolo delle probabilità ) chiamava il gioco del Lotto Tassa sulla stupidità.
29/10/16 14:23
Thejuster
probabilmente si, chiedo scusa nessuno, sto imparando il C++ sono praticamente un newbie con il linguaggio
mire.forumfree.it/ - Mire Engine
C# UI Designer