Hello,
I'm trying to get two files to link together one to say object-oriented and the other to say languages. so far i got the list to compile correctly but still not am to get it running wondering if anyone can help. thanks.
// Program StrRead reads and writes strings.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main ()
{
ifstream inFile;
ofstream outFile;
string inString1;
string inString2;
inFile.open("strdata.in"
outFile.open("outData.in"
inFile >> inString1;
inFile >> inString2;
cout << inString1 << endl;
cout << inString2 << endl;
outFile << inString1 << endl;
outFile << inString2 << endl;
return 0;
}
I'm trying to get two files to link together one to say object-oriented and the other to say languages. so far i got the list to compile correctly but still not am to get it running wondering if anyone can help. thanks.
// Program StrRead reads and writes strings.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main ()
{
ifstream inFile;
ofstream outFile;
string inString1;
string inString2;
inFile.open("strdata.in"
outFile.open("outData.in"
inFile >> inString1;
inFile >> inString2;
cout << inString1 << endl;
cout << inString2 << endl;
outFile << inString1 << endl;
outFile << inString2 << endl;
return 0;
}