complete nub.. iostream file not found

Posted by user1742389 on Stack Overflow See other posts from Stack Overflow or by user1742389
Published on 2012-10-12T21:24:45Z Indexed on 2012/10/12 21:37 UTC
Read the original article Hit count: 191

Filed under:
|

folks I am almost completely new to programming so please bear with me.

I am using the first example from lydia.com c++ videos and failing.

I am using Xcode 4.5.1 with a c++ command line project instead of eclipse and I am getting an error on compile of iostream file not found.

the code is simple and I will include exactly what I have at the end of this message.

I thought that iostream was a standard header that came with all even remotely recent versions of c++ compilers and am shocked to get this error and I cannot find any way to fix this. please tell me whats going on.

 #include <iostream>
 #include <stdio.h>
 #include <sstream>
 #include <vector> int main(int argc, char ** argv) {
     stringstream version;
     version << "GCC Version";
     _GNUC_<<"."<<_GNUC_MINOR_<<"."<<_GNUC_PATCHLEVEL_<<_"\nVersion String: " <<_VERSION_;
     cout <<version.string() endl;
     vector<string> v={"one","two","three"};
     for ( s : v )
     {
         cout << s <<endl;
     }


     // insert code here...
     printf("Hello, World!\n");
     return 0; }

Thanks.

© Stack Overflow or respective owner

Related posts about header

Related posts about iostream