Hello,

How to read an input(string) from the user keyboard without displaying it on the I/S, but to disply a character that I specify like (*) instead of the actual inputted character.. and if possible to store the entry on array


right now, I can't find any replacement for getch() which is a nonstandard function and doesn't exactly do what I want..
getline() as far as I know can't hide the input..


Thanks

Thanks for your response,
what's driving me crazy is getch() is being taught at college..it's non-standard and they didn't mention anything about that !

Member Avatar for iamthwee

Yeah well there ya go. It probably doesn't matter until you hit the real world. Schools just try to teach the fundamentals, logic etc, and pseudo code.

There are too many pitfalls persistent in c/c++ to catch out the unwary. You only get to know about them with experience.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.