trouble including "iostream" "fstream"

N

NewToCPP

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
 
N

NewToCPP

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
 
V

Victor Bazarov

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




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




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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top