Reputation: 4218
typedef struct _stResult {
std::string x;
int y;
struct _stResult *next;
} strResult;
In this structure i am getting the following error expected specifier-qualifier-list before std. What does this error mean?
Upvotes: 1
Views: 2956
Reputation: 31647
std::string
is not declared. If you #include <string>
at the top, the code compiles.
Upvotes: 3
Reputation: 57555
Did you forget to #include <string>
?
The compiler obviously doesn't recognize std::string
as a type.
Upvotes: 5