String errors?

I've just recently tried to make a program using multiple files, mainly just in order to keep things organized. in my "Include.h" file I declare all the functions, etc., and some of these functions return type is a string and some global variables are strings. Anyways, when I compile the whole project it comes up with a whole boatload of errors mainly revolving around something with std::string. I have no idea what this means, please help.
Hi,
Did you include the header <string>?
Yes I included string
Did you use using namespace std; from the very beginning before your global variables?
Yes I did that before everything else even before the #include's
Could you post some of the errors from your complier?
Yes I did that before everything else even before the #include's

First you shouldn't be using the "using" statements in a header file, instead properly scope the items from the std::namespace, ie: std::string.

Second if you do use the using statements they must be after the #include statements, not prior to them.

Third, I really recommend that you start using the scope resolution operator:: whenever required instead of the using statements.
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/194767/
Topic archived. No new replies allowed.