I'm having a problem scripting a program in C++. My goal is to have a basic username and password input/output system. I haven't been doing this very long so I don't know everything. I'm still cramming with tutorials and manuals before I get into college in the spring, so please understand my ignorance on this subject.
I am attempting to have a program that (step-by-step) accepts two usernames and passwords and then prints them onto the screen. It's just an exercise, I know it's not practical.
My issue is that I can't seem to store and release a full word. 'Int' doesn't work for obvious reasons, and when I use 'char' it only saves the first character. I've tried using 'std::string' which works halfway, but only outputs a sequence of numbers. I'm sure I'm doing something wrong and that this is just a beginner's mistake, but if I could get some help, that would be awesome.
Here's a sample of the code so you understand a little better:
I'm not going to lie, it's a little disappointing that the solution was as simple as removing the [20]. I was following a guide and it said to have that, I tweaked the script a lot so-as-to make my own program, but it didn't even occur to me to change that. It works perfectly not, thank you.