That because your cmd variable points to read only memory. When you trying to write into it it will crash. Declare your cmd variable like char cmd[10] = "start"; or char cmd[] = "start" or dymamically alloocate memory.
Even better would be use of std::string — no danger of overflow, no memory handling problems.
Thank you.
Peter87 - I added the "==0", and it didn't help.
MiiNiPaa - I changed it to std::string cmd, but when I try to use strcmp, I get an error - cannot convert argument 1 from 'std::string' to 'const char *'
Your first tip did it. Thank you!!!!