Archived

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

newb prob

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

i just downloaded the bloodshed compiler and ran some small test programs. both used the iostream.h header the first one ran fine the second one sent a message #include "backward_warning.h" i have been learning on the fly so this prob is new to me. i have had a real bad week so if anyone can help without making me feel too retarded i would appreciate it. thanx

Share this post


Link to post
Share on other sites
is deprecated so to speak. It is a backward compatible header. (and others header without .h) replace them.


#include <iostream.h>
int main(/*stuff here ...*/)
{
cout << "Hello World" << endl;
}


Becomes, with the current C++ standard:

#include <iostream>
int main(/*stuff here ...*/)
{
std::cout << "Hello World" << std::endl;
}


Notice the std:: bits, which means that those elements are now n the 'std' namespace. Altough it is often frowned upon at global scope, you can use
using namespace std; 
at function scope to save typing time.

[edited by - xMcBaiNx on May 29, 2004 2:33:40 PM]

Share this post


Link to post
Share on other sites