Archived

This topic is now archived and is closed to further replies.

iostream

This topic is 5684 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Why has everybody suddenly stopped using iostream.h. How do you use iostream. Should I change my programming style?

Share on other sites
The header "iostream.h" is deprecated, "iostream" is the new header. The new header''s contents are also placed in the std namespace.

Share on other sites
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.

Share on other sites
Using #include <iostream>, how do I use cin and cout?

Share on other sites
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.

Share on other sites
Wow, that''s simple. I''ll try using namespace std. BTW, what''s the advantage of using this STD crap?

Share on other sites
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?

Share on other sites
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