Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 iostream error
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Scooter341




PostPosted: Wed Apr 27, 2005 9:27 pm   Post subject: iostream error

I'm using DevC++ as my compiler and the #include <iostream> is failing to define my 'cout' and 'cin' commands and I have no idea why. As soon as it hits the first 'cout' it stops compiling and returns an error saying that it is undeclared.
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Wed Apr 27, 2005 9:40 pm   Post subject: (No subject)

cout, cin and cerr (for error messages) live in the "std" namespace in standard C++. To refer to these variables use std::cout, std::cin, or std::cerr, or, less advisably, include the line "using namespace std;".
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: