I'm having some problems defining a structure, can anyone help
this bit is in the header file
for some reason the compiler doesn't like me putting a string declaration into a struct. these are the errors generated.Code:#include <string>
struct netData{
public:
unsigned short int time;
unsigned short int dTime;
string path;
float prob;
float conc;
bool alarm;
netData *nxt;
};
c:\work\programming\nettest\nt.h(40) : error C2146: syntax error : missing ';' before identifier 'path'
c:\work\programming\nettest\nt.h(40) : error C2501: 'string' : missing storage-class or type specifiers
c:\work\programming\nettest\nt.h(40) : error C2501: 'path' : missing storage-class or type specifiers