problem with output

I am a dev student, my class was given an assignment mainly dealing with basic input\output. the program must read from a text file (no problems there), and then create another text file and output to that file (here is where I believe my problem is.

My input file (inData.txt) has two lines
A
11 22

the provided code for this assignment is:
#include <iostream>
// Include the header file fstream
#include <fstream>

using namespace std;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
int main()
{
	// Declare the stream variables
	ifstream inFile;
	ofstream outFile;

	// Open the files
	inFile.open("inData.txt");
	// This will create a file if it doesn’t exist
	outFile.open("outData.txt");

	// Code will go here for what you are trying to do
	
	// Close the files
    inFile.close();
    outFile.close();

	return 0;
}


i know i use inFile and outFile like cin and cout, my program will create the outData.txt file, but the values are wrong. I can't use assignment statements, it must be read from the inData.txt file and initialized through that....
if anyone could help guide me in the right direction, i would be greatly appreciative

cheeto
Topic archived. No new replies allowed.