Thread: fstream io Help
View Single Post
 
fstream io Help
Reply
Posted 2002-04-08, 05:57 PM
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(); 
}
Old
Profile PM WWW Search
spa is neither ape nor machine; has so far settled for the in-betweenspa is neither ape nor machine; has so far settled for the in-between
 
spa