Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

missing code in program

Status
Not open for further replies.

starmagic

Programmer
Feb 12, 2004
1
US
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(&quot;strdata.in&quot;);
outFile.open(&quot;outData.in&quot;);

inFile >> inString1;
inFile >> inString2;

cout << inString1 << endl;
cout << inString2 << endl;

outFile << inString1 << endl;
outFile << inString2 << endl;

return 0;
}

 
Hmm, the code that you given is &quot;empty&quot;. You want anybody else on the web to make the thinking for you?

Come up with a real problem, so that people can respond to you on this forum.

For sample code you can search codeguru.com if you want.


s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top