View Full Version : How do you use strings (c++) with xCode

Nov 27, 2005, 08:53 PM
I try using strings by including string.h...but I get scope errors when I declare a string. Whats the beef?

Nov 27, 2005, 09:24 PM
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.

Nov 28, 2005, 10:29 AM
Also #include <string> not <string.h>, the .h filenames have been deprecated.