I was just reading this page.
I prefer that to using namespace std. But it doesn't work on MSVisualC++. Is that another bug with it?Code:#include <iostream> using std::cout; int main() { cout << "Hello, World!\n"; return 0; }
I was just reading this page.
I prefer that to using namespace std. But it doesn't work on MSVisualC++. Is that another bug with it?Code:#include <iostream> using std::cout; int main() { cout << "Hello, World!\n"; return 0; }
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Works fine for me, even in VC++ 6.0. What error are you getting?
It works for me, and I use .net v2002
Gotta love the "please fix this for me, but I'm not going to tell you which functions we're allowed to use" posts.
It's like teaching people to walk by first breaking their legs - muppet teachers! - Salem
You're right, it works . . . .
Didn't earlier, with a longer program . . . maybe I was using something else in std . . . .
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
You can get past it by including the old (original) C++ libraries ( like #include <iostream.h> ) but that isn't a good idea. Once C++ became standardized, the .h was dropped to distinguish the old from the new libraries.
Here's a link to a good explanation...
http://members.gamedev.net/sicrane/a.../iostream.html