Quote:
im saying, im trying to make a console app in visual studios, and there is a code in c++ console called getline where u can type a line in console app, ther eanother code called cout where u can put a line in the console not typing, and while using {} in getline u can add a code with the getline typing code, im looking for a solution where i can type the getline code command that the console app tells me to type, not any other random key, make sense?
Not really, but it seems that you want to prompt the user for an input, then call getline and restrict what he can enter so it it valid data for your application.
If so, there is no "automatic" way to do that: the system has no idea what is and isn't valid as far as your application goes and there is no way to tell it.
Instead, you read the line of data, validate it according to your rules and either report a problem and let the user try again, or continue if the data is OK.