Why has everybody suddenly stopped using iostream.h. How do you use iostream. Should I change my programming style?
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.
Options, options:
Choose one.
#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.
Wow, that''s simple. I''ll try using namespace std. BTW, what''s the advantage of using this STD crap?
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
(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
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
Popular Topics
Advertisement