0

How to read character of string before enter is pressed?

I'm working on my very first project in c++ that is hotel management system. User Id consists of 13 letters so i took string instead of int. how to check if the user has entered correct input now?

16th May 2018, 5:26 PM
Maleeha Khalid
Maleeha Khalid  - avatar
7 Réponses
0
with conditional statements
16th May 2018, 5:28 PM
Rajeeb
+ 3
if(input.equals(id)){};
16th May 2018, 5:29 PM
D_Stark
D_Stark - avatar
0
string functions have compare parameters
16th May 2018, 5:28 PM
Rajeeb
0
can you elaborate? what parameters?
16th May 2018, 5:29 PM
Maleeha Khalid
Maleeha Khalid  - avatar
0
strcmp()
16th May 2018, 5:29 PM
Rajeeb
0
ok I'll try this parameter and will let you know if it worked for me..thank you btw ☺
16th May 2018, 5:31 PM
Maleeha Khalid
Maleeha Khalid  - avatar
0
If you are on wondows check GetAsyncKeyState
16th May 2018, 5:40 PM
Bebida Roja
Bebida Roja - avatar