Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File deletion and get resolution

Status
Not open for further replies.

Sherak

Programmer
Sep 1, 2003
83
GB
i was wondering if you create a file fstream->open("file.txt.",ios::in) it creates the file, but once I have finished with it, it is resident in current working directory, how can I delete it...

Also how do I get the current resolution of the machine the program is being executed on ?

thanks
 
> how can I delete it...
Code:
  DeleteFile("file.txt");
Of course the file must be closed first.

>Also how do I get the current resolution of the machine the program is being executed on ?

like this:
Code:
  int Y = Screen->Height;
  int X = Screen->Width;

Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top