Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17

Thread: My program

  1. #16
    Registered User
    Join Date
    Nov 2002
    Posts
    36
    Select console application in the workspace wizard.

  2. #17
    Registered User
    Join Date
    May 2002
    Posts
    13

    Re: My program

    Originally posted by KaL
    Code:
                LPSTR pCurChar;
    			char pName[512];
    
                // strip path and leave exe filename 
                for (pCurChar = (pe32.szExeFile + strlen (pe32.szExeFile)); 
                     *pCurChar != '\\' && pCurChar != pe32.szExeFile - 1;  
                     --pCurChar) 
    
                strcpy(pName, pCurChar); 
    			strlwr(pName);
    Because i am SOOO anal-retentive...

    this is not a rant or meant to show ANY disrespect... i truely appreciate forums such as these...

    the code snippet above from KaL's post HAPPENS to function correctly, but there really should be a semi-colon or a set of empty braces {} after the for-loop. It happens to work because the strcpy is just re-writing pName over and over, ending up at the place you want it to be anyways.

    Sorry, but i felt compelled to mention it.

    And, as soon as its fixed, my post will look inane, which means i'll eventually come edit it out =P

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is Off