Reputation: 1570 Grandmaster
- Active Posts:
- 5,506 (2.34 per day)
- 19-February 09
- Profile Views:
- Last Active:
- Today, 11:16 AM
- Who Cares
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
- Expert In:
Posts I've Made
Posted 27 Jul 2015You can use quotes around the whole pathname including the drive, path and filename. The reason quotes are used is so the CMD processor considers parameters with spaces as a single parameter.
TCHAR cmd = _T("\"C:\\Program Files (x86)\\ABC MCC 7500\\bin\\DebugMonitor.exe\" runQuery --host_client \"EXY DISPATCH\" --query 1");
Posted 27 Jul 2015Hi, you could use strstr to test whether a word is in the sentence. Then check if the start is valid and end is valid.
Posted 27 Jul 2015Hi, the backslash is used for escape sequences. With paths you can use double backslash (escape sequence) or a forward slash.
"C:\\Program Files (x86)" "C:/Program Files (x86)"
If you want to add double quotes to a C string, for parameters or path for example, you can use an escape sequence backslash + double quotes.
"DebugMonitor.exe \"EXY DISPATCH\" "
You can print the string to see the effect.
Posted 26 Jul 2015Hi, the front method only works on non-empty strings, so it may be that. You could try setting output to a null character when the string is empty.
Posted 26 Jul 2015Hi, there is a getsize function for the window. Your program moves the car so should store where it is.
The car is inside the window.
0,0 ------------------------ | | | | | x,y | | ------- | | |<o-o>| | | ------- | ------------------------ 799,599
So when the car hits on the left then x == 0.
Otherwise, if you had thin rectangles to define the window edges you could use Rectangle intersect.
- Member Title:
- Duke of Err
- Age Unknown
- Birthday Unknown
- Delta Quadrant
- Years Programming:
- Programming Languages:
- Website URL: