Mail Archives: djgpp/1998/03/24/22:45:44
From: | wlwong AT earthling DOT net
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Parse error while using 'mkdir'
|
Date: | Tue, 24 Mar 1998 21:30:56 -0600
|
Organization: | Deja News - The Leader in Internet Discussion
|
Lines: | 31
|
Message-ID: | <6f9toi$9e8$1@nnrp1.dejanews.com>
|
NNTP-Posting-Host: | 138.38.32.5
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hello!
I'm currently trying to write a simple EXE which prompts the user for a
directory name, and then make that directory using the 'mkdir' command.
I have an if statement to check for the 2nd and third parameter of the
directory string to make sure it's a colon ':' and the frontslash '\' before
proceeding, something like this :
char dir[50]; //string to hold directory path
if ((dir[1] != ':' ) || (dir[2] != '\\')
{
// warning here
}
However, the if statement gives a "parse error before character 0335" error
while compiling. Also, while reading up on the 'mkdir' function, it takes a
2nd argument S_IWUSR in the example. Can anybody please shed some light on
this matter, and tell me how to use the mkdir properly?
If I remove the '\\' bit from the if statement, it compiles alright.
Please e-mail all replies if possible. Thank you for your time. :)
Regards,
Whye
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
- Raw text -