473,394 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

trouble including "iostream" "fstream"

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

Jan 17 '06 #1
2 7135
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

Jan 17 '06 #2
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
Jan 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Christopher Reeve | last post by:
Hi, I wonder if anyone could help me. I am moving accross from C to C++ and am writing a program that reads and writes data into a file. I am aware of the old C ways of doing it but am trying to...
10
by: Dave O'Hearn | last post by:
I want to open a file for both reading and writing, but when I do "ios::in|ios::out" with an fstream, it creates the file if it doesn't already exist. I don't like that last part. C's fopen has the...
3
by: Griff | last post by:
#include <iostream> using namespace std; #include <vector> #include <string> #include <fstream> #include <algorithm> template<class C>void PrintAll(C&v) {
7
by: jccorreu | last post by:
I've got to read info from multiple files that will be given to me. I know the format and what the data is. The thing is each time we run the program we may be using a differnt number of files,...
1
by: Robbie Hatley | last post by:
Say I have an ifstream object, like so: #include <iostream> #include <fstream> int main(int, char* Sam) { std::ifstream Bob; Bob.open(Sam); std::string buffer; while (42)
9
by: Xian | last post by:
Is there a right and proper (tm) way to end a line? Thinking about portability and the mess that the 'wrong' line endings can cause. E.g. std::cout << "Hello World!\n"; or std::cout << "Hello...
9
by: Robin | last post by:
// Pls note that test.txt exists. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { fstream fs("test.txt", ios_base::in | ios_base::app);
23
by: mahesh | last post by:
Hi all, I have following code that is supposed to increase the power by specified value. int main() { system("cls"); int i, exponent; double base; double new_base=0.0;
2
by: mauricesmith42 | last post by:
Sorry i know this is rather large to be posting, but in order to understand the question you have to see all the code //#include <windows.h> //needed for opening folders #include...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.