Zelaron Gaming Forum

Zelaron Gaming Forum (http://zelaron.com/forum/index.php)
-   Tech Help (http://zelaron.com/forum/forumdisplay.php?f=329)
-   -   fstream io Help (http://zelaron.com/forum/showthread.php?t=2263)

spa 2002-04-08 05:57 PM

fstream io Help
 
can some tell me wats wrong with my code it prints nothin to the screen
Code:

#include <fstream.h>
#include <conio.h>
int main()
{
ifstream in_file("Greeting.ext");
ofstream out_file("Out.ext");
int numbersOfContestant;
numbersOfContestant = 3;
out_file << "Numbers of contestant: " << numbersOfContestant << endl;
out_file << "Names of contestant:\n";
out_file << "David" << endl;
out_file << "Janice" << endl;
out_file << "GundamSD" << endl;

out_file << "Greeting, David, welcome to the contest!" << endl;
out_file << "Greeting, Janice,welcome to the contest!" << endl;
out_file << "Greeting, GundamSD, welcome to the contest!" << "\n\n";
out_file << "Press enter to exit.";
getche();
}


Badass Gandhi 2002-04-08 08:25 PM

It doesn't print anything to the screen because all of the output goes to out_file, so all of it ends up in Out.ext


All times are GMT -6. The time now is 02:07 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.