gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
Yeah, well that tells use nothing. Please post the current code and error and warning
messages.
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
Okay, to use
vector v1;
without the need of the preceding std::, you need to include the
using namespace std;
at the beginning of the header file, else std:: will be required.
Well its O.K. if its not in a header file where we can assume things like the user will use things like 'using namespace std;'
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
What do you mean by that?
Header files shouldn't assume anything. They should be simple and plain...without any preconceptions...we can't assume that the programmer will state 'using namespace std'.
Please read Accelerated C++ or Ruminations on C++ or C++ Primer...All these books state, that header files should be unqualified.
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
In the wise words of - Lippman/Koenig and Moo don't assume anything. Write your header files uncomplicated...don't assume an environment that may not exist.
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387