With most other compilers (well maybe not most) a few of them require you to put
using namespace std;
With Dev-C++ 4.9.7.4-GCC-3.2 is that the case??? I mean I'm not using it because I get all these errors and I feel safer using GCC-2.95, but with Dev-C++ one time I did put using namespace std; and all these errors popped up like.
Implicit declaration of std::cout <<
when I put
cout <<
so whats the deal with that(meaning GCC-2.95 and GCC-3.2) why doesn't GCC-3.2 not work as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, what has happened is that gcc-2.95 was not as standards compliant as 3.2, people go used to it (or Msoft or Borland), and when it gets done right, people say what's wrong with things.
The C++ standard called for the change from C notation for headers, i.e.
iostream.h
is deprecated and replaced by
iostream
With the names of the functions contained in iostream being in the standard namespace, which means you have two options for calling functions like cout. The easier one is to include
using namespace std;
Then you can just have something like
cout << "Wazzzuuuuup\n";
Now, there are some coding practice that discourage the use of using, they want you to specify or qualify where a function is coming from, in which case you can not use the using statement and qualify like this:
std::cout << "How should I know\n";
Now, there are some install issues with the 4.9.7.x series, some things do not get put into the C++ includes path, I have posted the link to the post on that about 6 times a day for the last month, you can find it by searching on my name and check and out, make sure you check the use all words box on the search page.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With most other compilers (well maybe not most) a few of them require you to put
using namespace std;
With Dev-C++ 4.9.7.4-GCC-3.2 is that the case??? I mean I'm not using it because I get all these errors and I feel safer using GCC-2.95, but with Dev-C++ one time I did put using namespace std; and all these errors popped up like.
Implicit declaration of std::cout <<
when I put
cout <<
so whats the deal with that(meaning GCC-2.95 and GCC-3.2) why doesn't GCC-3.2 not work as well.
Take care how you phrase things.
"why doesn't GCC-3.2 not work as well"
Actually, what has happened is that gcc-2.95 was not as standards compliant as 3.2, people go used to it (or Msoft or Borland), and when it gets done right, people say what's wrong with things.
The C++ standard called for the change from C notation for headers, i.e.
iostream.h
is deprecated and replaced by
iostream
With the names of the functions contained in iostream being in the standard namespace, which means you have two options for calling functions like cout. The easier one is to include
using namespace std;
Then you can just have something like
cout << "Wazzzuuuuup\n";
Now, there are some coding practice that discourage the use of using, they want you to specify or qualify where a function is coming from, in which case you can not use the using statement and qualify like this:
std::cout << "How should I know\n";
Now, there are some install issues with the 4.9.7.x series, some things do not get put into the C++ includes path, I have posted the link to the post on that about 6 times a day for the last month, you can find it by searching on my name and check and out, make sure you check the use all words box on the search page.
Wayne