Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: radioland2 on April 26, 2010, 04:53:43 am

Title: WRITING TO A DISK
Post by: radioland2 on April 26, 2010, 04:53:43 am
 I'm new to Code ::Block.I tried using the program (pg 296),to write to a disk.The program is as follows:
#include <fstream>
using name space std;
int main(int nNumberof Args, char* pszArgs[])
{
ofstream my("MyName.txt");
my<<"steve is suave and handsome\n"
<<"but getting bald"
<<endl;
system ("PAUSE");
return 0;}***********Itried replacing the "txt"  with "disk", but it doesn't write to the disk in the "a" port.It gets written to the same
folder as the "txt", but cannot be opened.????? What did miss in the book?  Need help!!

                                                                                                                                                                                                                                                                                                   
Title: Re: WRITING TO A DISK
Post by: Jenna on April 26, 2010, 05:08:06 am
Absolutely unrelated to C::B, therefore violating our forum rules.

We do not answer general programming questions.

You seem to lack not even basic programming skills, but also knowledge about how your computer works.

Topic locked !!