Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top