
please wait
|
|
"cin" is not executed exept the first one |
cin
(at line 19) in the entire code?
fgets(msg,300,stdin);
cin>>port_name;
leaves the end of line in the stream hence fgets() gets an empty line. use ignore() to remove the end of line from the stream.