brijith
April 17th, 2008, 01:02 PM
hai,
In my college days I used to write CPP programs as below
#include <iostream.h>
int main()
{
char s[10];
cout << "Hello World!" << std::endl;
cin >> s;
cout<< s<<"\n";
return 0;
}
that day we were using ReadHat 9. When I tried the same code in new Linux distribution it is not working
for the above code to work I have to change it as below
#include <iostream>
int main()
{
char s[10];
std::cout << "Hello World!" << std::endl;
std::cin >> s;
std::cout<< s<<"\n";
return 0;
}
Why this change? can any body suggest a tutorial where I can get a simple note about these type of changes.
I am refreshing C++ after a long period of time.
Thanks
In my college days I used to write CPP programs as below
#include <iostream.h>
int main()
{
char s[10];
cout << "Hello World!" << std::endl;
cin >> s;
cout<< s<<"\n";
return 0;
}
that day we were using ReadHat 9. When I tried the same code in new Linux distribution it is not working
for the above code to work I have to change it as below
#include <iostream>
int main()
{
char s[10];
std::cout << "Hello World!" << std::endl;
std::cin >> s;
std::cout<< s<<"\n";
return 0;
}
Why this change? can any body suggest a tutorial where I can get a simple note about these type of changes.
I am refreshing C++ after a long period of time.
Thanks