Deleting a temp file

This is a discussion on Deleting a temp file within the C++ Programming forums, part of the General Programming Boards category; Simple code: Code: remove("c:\windows\desktop\mytemp.txt"); The problem I'm trying to get around is the need to be explicit as to where ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Location
    Scranton, Pa
    Posts
    252

    Deleting a temp file

    Simple code:

    Code:
    remove("c:\\windows\\desktop\\mytemp.txt");
    The problem I'm trying to get around is the need to be explicit as to where in the *dir that particular file is. I've read thru that convoluted mess at msdn, but that damn website give me too much of a freakin' headache.

    Mostly, is there some *wildcard dir that would negate the need to for full pathway? I assumed, and wrongly it seems that the file simply being in the same directory as that of the program isn't enough.
    Last edited by Oldman47; 01-02-2007 at 05:45 PM.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Scranton, Pa
    Posts
    252
    Eh, nevermind. I overlooked the simple solution; since I'm the one creating the file it'd stand to reason that I'd know where I put it. D'oh!

    Sorry 'bout that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM

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