question
Aug 16, 2011 at 5:44pm Aug 16, 2011 at 5:44pm UTC
why can i use using namespace std; when i can run .....! have an error....? for using namespace std; ..?
Aug 16, 2011 at 5:50pm Aug 16, 2011 at 5:50pm UTC
Try writing sentences that make sense. If something doesn't compile, post the code and the error message.
Aug 16, 2011 at 5:52pm Aug 16, 2011 at 5:52pm UTC
what is the function of using namespace std; ...?
Aug 16, 2011 at 5:57pm Aug 16, 2011 at 5:57pm UTC
the standard namespace allows you to use the cout and cin streams and the string class as well as others. You could do std::cout << var;
without using namespace std.
Aug 16, 2011 at 6:21pm Aug 16, 2011 at 6:21pm UTC
Do you have
1 2 3 4 5
#included <iostream>
or
#included <fstream>
or
#included <sstream>
In your code?
Topic archived. No new replies allowed.