trouble including "iostream" "fstream"

Discussion in 'C++' started by NewToCPP, Jan 17, 2006.

  1. NewToCPP

    NewToCPP Guest

    I am having some trouble including "iostream" "fstream" to my code.

    I tried the following ways and base times it did not work. What is the
    problem?

    test.cc:
    =======
    .....
    #include <iostream.h>
    #include <fstream.h>
    ......


    >g++ test.cc

    test.cc:8: iostream.h: No such file or directory
    test.cc:9: fstream.h: No such file or directory



    >gcc test.cc

    test.cc:8: iostream.h: No such file or directory
    test.cc:9: fstream.h: No such file or directory




    test.cc:
    =======
    .....
    #include <iostream>
    #include <fstream>
    using namespace std;
    using std::cout;
    ......
    .....




    >g++ test.cc

    test.cc:8: iostream.h: No such file or directory
    test.cc:9: fstream.h: No such file or directory



    >gcc test.cc

    test.cc:8: iostream.h: No such file or directory
    test.cc:9: fstream.h: No such file or directory
    NewToCPP, Jan 17, 2006
    #1
    1. Advertising

  2. NewToCPP

    NewToCPP Guest

    cut and past problem... The second scenario is as below:
    test.cc:
    =======
    .....
    #include <iostream>
    #include <fstream>
    using namespace std;
    using std::cout;
    ......
    .....

    >g++ test.cc


    test.cc:8: iostream: No such file or directory
    test.cc:9: fstream: No such file or directory

    >gcc test.cc


    test.cc:8: iostream: No such file or directory
    test.cc:9: fstream: No such file or directory
    NewToCPP, Jan 17, 2006
    #2
    1. Advertising

  3. NewToCPP wrote:
    > cut and past problem... The second scenario is as below:
    > test.cc:
    > =======
    > ....
    > #include <iostream>
    > #include <fstream>
    > using namespace std;
    > using std::cout;
    > .....
    > ....
    >
    >
    >>g++ test.cc

    >
    >
    > test.cc:8: iostream: No such file or directory
    > test.cc:9: fstream: No such file or directory
    >
    >
    >>gcc test.cc

    >
    >
    > test.cc:8: iostream: No such file or directory
    > test.cc:9: fstream: No such file or directory
    >


    This is OT. Your installation is apparently defective. Ask for help
    in gnu.g++.help.

    V
    Victor Bazarov, Jan 17, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Tiger
    Replies:
    10
    Views:
    5,577
  2. Charles L
    Replies:
    11
    Views:
    767
    Keith Meidling
    Jul 1, 2004
  3. ai@work
    Replies:
    9
    Views:
    537
    Ron Natalie
    Dec 16, 2004
  4. S. Nurbe

    iostream + iostream.h

    S. Nurbe, Jan 14, 2005, in forum: C++
    Replies:
    7
    Views:
    768
    red floyd
    Jan 15, 2005
  5. red floyd
    Replies:
    3
    Views:
    533
    Dietmar Kuehl
    Mar 8, 2005
Loading...

Share This Page