How to transmit ctrl-z at the end of string in C++?

Status
Not open for further replies.

DCO_81

Member level 1
Joined
Mar 10, 2005
Messages
39
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany, south
Activity points
1,657
generate a ctrl+z in c++

Hi,

how can I cat "ctrl-z" at the end of a given string?

-----> strcat(string, [ctrl-z] );

I know that the hexcode is 0x1A but the 2nd argument have to be type of const char *. Is there a escape-sequence like \r or \n ?
 

ctrl-z escape sequence z

if you insist on using strcat you could create a char array

char ctrlZ[]={0x1A,0x00};

then you can use ctrlZ as the argument.
 

    DCO_81

    Points: 2
    Helpful Answer Positive Rating
transmit ctrl-z with c++

Afaik
\0xxx can be done in strings , but xxx has to be octal

/Bingo
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…