Government Security
Network Security Resources

Jump to content


Iosteam Compile Error?

- - - - - c++
  • Please log in to reply
4 replies to this topic

#1 ragingvisions



  • Members
  • 2 posts

Posted 07 August 2010 - 05:35 PM

Hi there, just started learning to program c++.
I am running Visual C++ 2008 Express edition and using the command line compiler.
When I try to compile the basic "hello world" application, I get this error.

Sample.cpp(1) : fatal error C1083: Cannot open include file: 'iostream': No such
file or directory.

I have tried both <iostream.h> and just <iostream>. I am also using "using namespace std;"

I tried searching google and these forums but the most common error is people are still using iostream.h when that has actually been deprecated I believe.

Any suggestions?


#2 bonarez


    Retired GSO Second Lieutenant

  • Sergeant Major
  • 1,252 posts

Posted 07 August 2010 - 07:53 PM

use /showIncludes when compiling to get an idea of what goes wrong.

also showing us some code wouldn't harm..
"Ask the right question and you will receive the right answer. I'm just very sensitive about the right syntax"

Read the rules before you post

#3 ragingvisions



  • Members
  • 2 posts

Posted 08 August 2010 - 01:33 PM

Thanks for the response bonarez.

I found out that the directories that it was looking for the includes folder was incorrect and it is fixed now

#4 GHx



  • Members
  • 3 posts

Posted 26 October 2011 - 05:01 PM

start a new empty project. After you include iostream, make sure that you use: using namespace std; //for cin/cout etc

#5 eGrove Systems

eGrove Systems


  • Members
  • 10 posts

Posted 08 January 2013 - 02:45 AM

Using these header file

Also tagged with one or more of these keywords: c++