iostream? where did it go?

Posted:
in macOS edited January 2014
Last year I made a bunch of commandline C++ programs for school using project builder and everything worked fine.



Now I come back to them and they don't work because iostream is nowhere to be found. When did it get axed and why? It's a pretty basic library... And the stdio in project builder wanted me to enter all the scanf's before printing any of the printf's... all seems kinda weird to me.

Comments

  • Reply 1 of 5
    [quote]Originally posted by Code Master:

    <strong>Last year I made a bunch of commandline C++ programs for school using project builder and everything worked fine.



    Now I come back to them and they don't work because iostream is nowhere to be found. When did it get axed and why? It's a pretty basic library... And the stdio in project builder wanted me to enter all the scanf's before printing any of the printf's... all seems kinda weird to me.</strong><hr></blockquote>



    I'm using iostream just fine. I just double checked and iostream.h works as well. Are you sure that the dev tools are installed? It has to be the new version if you're running 10.2, the copy that came with 10.1 won't work.
  • Reply 2 of 5
    Yes, I installed the developers tools when I installed Jaguar. As far as I know, iostream.h should be in /usr/include/ but it's not there. Do you have one there?



    [ 11-19-2002: Message edited by: Code Master ]</p>
  • Reply 3 of 5
    eugeneeugene Posts: 8,254member
    [code][5] [email protected]:~&gt; find /usr -name iostream\\*

    /usr/include/gcc/darwin/2.95.2/g++/iostream

    /usr/include/gcc/darwin/2.95.2/g++/iostream.h

    /usr/include/gcc/darwin/3.1/g++-v3/backward/iostream.h

    /usr/include/gcc/darwin/3.1/g++-v3/iostream

    /usr/include/gcc/darwin/3.3/c++/backward/iostream.h

    /usr/include/gcc/darwin/3.3/c++/iostream</pre><hr></blockquote>



    Ignore the gcc 3.3 stuff
  • Reply 4 of 5
    much thanks!

    I wonder why it wasn't set to include it.. I'll have to look at my Project Builder default include paths
  • Reply 5 of 5
    I remember that if I compiled with cc instead of c++ iostream would not work.



    I mean, on the command like you could type "cc hello.c" or "c++ hello.cc", and for some reason it stopped working if I typed cc, so I had to start typing c++ to compile C++ stuff.
Sign In or Register to comment.