What's wrong with this code??
I've been struggling to figure out what's wrong with this. Can somebody help? Using VC++ I have this code :
Code:
#include <stdio.h>
#include <iostream.h>
#include <string.h>
string sMyStr;
int main()
{
sMyStr = "Hello";
return 0;
}
I get these errors :
Quote:
C:\Program Files\Microsoft Visual Studio\MyProjects\jwDOS3\jwDOS3.cpp(5) : error C2146: syntax error : missing ';' before identifier 'sMyStr'
C:\Program Files\Microsoft Visual Studio\MyProjects\jwDOS3\jwDOS3.cpp(5) : error C2501: 'string' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio\MyProjects\jwDOS3\jwDOS3.cpp(5) : fatal error C1004: unexpected end of file found
:mad::(:mad: