ok, i included string.h but i still can''t declare a string...
any help, pls.................
Error C0000: No dirty 4 letter words allowed
-=Idiot of the Net=-
string type
I think you have to include string (not .h)
and then have the following line:
#using namespace std;
Edited by - Zook on September 24, 2001 3:02:39 AM
and then have the following line:
#using namespace std;
Edited by - Zook on September 24, 2001 3:02:39 AM
there shouldn''t be a #-character before the using-statement. Only preprocessor commands are preceeded by a #-character, and using is not a preprocessor command.
i.e.
Alternatively, you can instead use the std:: qualifier on each occurrence of string, for example:
Or, by ''importing'' only the string-type from the namespace std, instead of importing the whole namespace (which is what the ''suing namespace std'' statement will accomplish),
i.e.
using namespace std;string s;
Alternatively, you can instead use the std:: qualifier on each occurrence of string, for example:
// declare a string using a fully qualified namestd::string s;
Or, by ''importing'' only the string-type from the namespace std, instead of importing the whole namespace (which is what the ''suing namespace std'' statement will accomplish),
using std::string;string s;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement