30 Reputation Points
Ranked #833
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
60% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
0 Endorsements
Ranked #107.49K
Re: here is a code to read an array of characters until user press CTRL+C void read_ctrl_z(char *x){ int i = 0; while (true) { x[i++] = getch(); if(x[i-1] == 26) { x[i-1] = '\0'; cout<<endl; break; }else{ cout<<x[i-1]; } } } |