Thread: Getting past the C++ DOS Pathname collision

  1. #1
    Adamant Programmer Axpen's Avatar
    Join Date
    Jun 2003
    Location
    USA
    Posts
    42

    Exclamation Getting past the C++ DOS Pathname collision

    My problem is I want this to compile right:

    Code:
    system ("C:\\"your drive"\\"your file".exe");
    obviously to C++ it looks like your saying C:\, your drive(), \, your file(), .exe, I even tried char arraying...:

    Code:
    char iPATH[] = {'"','C',':','\\','y','o','u','r',' ','d','r','i','v','e','\\','y','o','u','r',' ',
    'f','i','l','e','"','.','e','x','e'};
    
    system (iPATH);
    However that didn't seem to work either, " can't be in a ' ', so is there a way of expressing paranthesis like HTML's &-l-t-; = < &-g-t-; = >, I heard about expressing them as hex, my char map in arial font says unicode is 0022, however the web wasn't much help, can someone help?

    Any and all help will be greatly appriciated,
    --Alex

    Compiler: Bloodshed DevC++ 4
    Windows Ver.: XP (Home) Version 5.1.2600 Service Pack 1 Build 2600

    PS -- Sorry if this isn't enough info, this is the third time I finished writing a copy of it, and my browser kept
    auto refreshing somehow, so if you need to know more please just PM or reply me and i'll PM you
    or reply back on the thread the answer to what you need to know to help, thanks alot!
    The Man With 3 Ears::Oh no better get the huskers

    Download Helppc by David Jurgens, It's a FANTASTIC Reference!!!

    In Case I Forget I Have:
    Windows XP
    For My 32-bit Questions:
    Dev C++ (mainly just use its mingw)
    For My 16-bit Questions:
    Borland Turbo C++ 1.01

  2. #2
    Registered User Xei's Avatar
    Join Date
    May 2002
    Posts
    719
    Look these up, I believe that will answer your question:

    GetShortPathname(...)
    strcat(...) or wcscat(...)
    "What are you after - the vague post of the week award?" - Salem
    IPv6 Ready.
    Travel the world, meet interesting people...kill them.
    Trying to fix or change something, only guaruntees and perpetuates its existence.
    I don't know about angels, but it is fear that gives men wings.
    The problem with wanting something is the fear of losing it, or never having it. The thought makes you weak.

    E-Mail Xei

  3. #3
    Adamant Programmer Axpen's Avatar
    Join Date
    Jun 2003
    Location
    USA
    Posts
    42

    Thumbs up Thanks

    Thanks alot, I tried \" and that worked, I wasn't aware of the backslash being an override, knowing that will help in more ways than 1, thanks Salem and Xei.
    --Alex
    The Man With 3 Ears::Oh no better get the huskers

    Download Helppc by David Jurgens, It's a FANTASTIC Reference!!!

    In Case I Forget I Have:
    Windows XP
    For My 32-bit Questions:
    Dev C++ (mainly just use its mingw)
    For My 16-bit Questions:
    Borland Turbo C++ 1.01

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Some collision handling fun
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 04-13-2008, 08:45 AM
  2. Collision Detection Problems
    By Dark_Phoenix in forum Game Programming
    Replies: 1
    Last Post: 12-17-2006, 03:25 PM
  3. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 09:08 PM
  4. Replies: 4
    Last Post: 05-03-2002, 09:40 PM
  5. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 01:42 PM