iostream

Started by
7 comments, last by gamechampionx 21 years, 9 months ago
Why has everybody suddenly stopped using iostream.h. How do you use iostream. Should I change my programming style?
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
Advertisement
The header "iostream.h" is deprecated, "iostream" is the new header. The new header''s contents are also placed in the std namespace.

quote:Original post by gamechampionx
Why has everybody suddenly stopped using iostream.h. How do you use iostream. Should I change my programming style?


Suddenly? The change came in 1998. Should you change? It''s up to your tastes and depends if you work with old code or not.

Using #include <iostream>, how do I use cin and cout?
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
Options, options:

  #include <iostream>int main(){   std::cout << "Hello world" << std::endl;}  



  #include <iostream>using namespace std;int main(){   cout << "Hello world" << endl;}  



  #include <iostream>using std::cout;using std::endl;int main(){   cout << "Hello world" << endl;}  


Choose one.

--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Wow, that''s simple. I''ll try using namespace std. BTW, what''s the advantage of using this STD crap?
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
quote:Original post by gamechampionx
Wow, that''s simple. I''ll try using namespace std. BTW, what''s the advantage of using this STD crap?


STD is bad for your health.
The bad thing is it attracts people like fallenang3l
(j/k)

------------
aud.vze.com - The Audacious Engine <-- It''s not much, yet. But it''s mine... my own... my preciousssss...
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
_______________________________________Pixelante Game Studios - Fowl Language
It helps prevents naming collisions between any functions/objects/whatever that you make and the ones included in the standard library.

This topic is closed to new replies.

Advertisement