R rgwebb macrumors 6502a Original poster Nov 27, 2005 #1 I try using strings by including string.h...but I get scope errors when I declare a string. Whats the beef?
I try using strings by including string.h...but I get scope errors when I declare a string. Whats the beef?
csubear macrumors 6502a Nov 27, 2005 #2 You need to include the proper namespace, in this case you should be using std::string or at global scope declare "using namepsace std". Everything from the stl is in the std namespace. Its like that on ever complier that i know of.
You need to include the proper namespace, in this case you should be using std::string or at global scope declare "using namepsace std". Everything from the stl is in the std namespace. Its like that on ever complier that i know of.
A AlmostThere macrumors 6502a Nov 28, 2005 #3 Also #include <string> not <string.h>, the .h filenames have been deprecated.