Author Topic: WRITING TO A DISK  (Read 2517 times)

Offline radioland2

  • Single posting newcomer
  • *
  • Posts: 2
WRITING TO A DISK
« 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!!

                                                                                                                                                                                                                                                                                                   

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: WRITING TO A DISK
« Reply #1 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 !!