Jun 4, 2014 at 8:30pm
oh and when i have a space in my input it puts
C:/Konsole/Commands/>sampls man
C:/Konsole/Commands/>
C:/Konsole/Commands/>
and not
C:/Konsole/Commands/>sample man
C:/Konsole/Commands/>
Jun 4, 2014 at 8:33pm
Line 26: You can't do a scanf into a C++ string. scanf only works with C-strings.
To answer your initial question (assuming you leave mystr as a C++ string):
1 2 3
|
if (mystr == "cls")
{ // do something
}
|
This ignores the problem of case sensitivity.
Line 28: You should avoid the use of
goto
. It's a poor practice.
Last edited on Jun 4, 2014 at 8:34pm
Jun 4, 2014 at 8:34pm
@Abs yes I changed it to while (true) {
}
guest i thougth of batch