FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Problem with using Dev-C++ Editor





AhmedSalmanJamal
Hi,

I am trying to learn the language C++ and am using the editor Dev-C++. When I write the heading #include <iostream> , the compiler tells me an error that it cannot find the file iostream in the c++ directory... I have however enter the header files in all the directories...but the problem still exists...please let me know if there is any possible solution to this...

Cheers

Salman
AhmedSalmanJamal
I have found the solution to the problem... all we need to do is go to Tools -> Compiler Options -> Directories -> Libraries and then make sure that all the directories which hold the .dll files and the header files (i.e. .h files) are added in the directories list Very Happy
AhmedSalmanJamal
I thought that I must just add this small bit of information ... if you are getting errors in your program while using the command "cout" even though you have included the header - #include <iostream> , then not to worry because the solution is simple .....

Simply write std::cout instead of cout ..... you might find that the same may apply when you are declaring a string variable .... hence instead of writing

string myVariable;

Please write -

std::string myVariable;


Very Happy
Nyizsa
Or put this line after the #inculde lines:
Code:
using namespace std;
AhmedSalmanJamal
That was a splendid idea...it makes life of coding much easier... thank you Nyizsa Very Happy
Related topics
What computer languages you know?
A "small" list of free apps
Free C++ resource editor?
Which C++ IDE do you use?
Spammers fraudulently using your domain name
Preferred language
C++ code problem
FRoMeGame's C++ Questions
Problem with glut
DEV C++ HAS NO SLEEP FUNCTION!! SOLVED!
C++ Software
C++ having a problem.
A Good C/C++ Compiler?
C++ Using class methods in inline functions? Scope problem?
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.