C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 05-08-2006, 04:17 PM   #1
System-7
 
Join Date: Nov 2005
Posts: 65
Create a file from c++ program

I'm trying to create a file when i run my program. So say i want to create a file called hello.txt and put my output in it.

What code would i write so that it would create that file?

Thanks for any help,

...Dan
Dan17 is offline   Reply With Quote
Old 05-08-2006, 04:21 PM   #2
The Richness...
 
Richie T's Avatar
 
Join Date: Jan 2006
Location: Ireland
Posts: 469
This should explain how to do what you want
__________________
No No's:
fflush (stdin); gets (); void main ();


Goodies:
Example of fgets (); The FAQ, C/C++ Reference


My Gear:
OS - Windows XP
IDE - MS Visual C++ 2008 Express Edition


ASCII stupid question, get a stupid ANSI
Richie T is offline   Reply With Quote
Old 05-08-2006, 04:25 PM   #3
System-7
 
Join Date: Nov 2005
Posts: 65
Thanks I'll take a look at it
Dan17 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sequential file program needhelpbad C Programming 80 06-08-2008 01:04 PM
Totally confused on assigment using linked lists Uchihanokonoha C++ Programming 8 01-05-2008 04:49 PM
Batch file programming year2038bug Tech Board 10 09-05-2005 03:30 PM
fopen(); GanglyLamb C Programming 8 11-03-2002 12:39 PM
My program, anyhelp @licomb C Programming 14 08-14-2001 10:04 PM


All times are GMT -6. The time now is 04:43 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22