2 Noobish Questions from a 2nd Day Learner
Hey Guys,
I literally just started C++ yesterday and I'm already loving it. I am using the Bloodshed Dev-C++ Compiler to work on my coding/compiling. I am taking C++ as an independent study course in High School, so all I have to learn from is some old book that doesn't elaborate for somebody who is unfamilar with C or C++.
Anyways, I have two questions to ask of you guys. They are probably going to seem VERY noobish, but please keep in mind that I have only started yesterday.
Question #1: My programs terminate after they have finished their execution. I have done a couple of lessons out of my book which involves create very simple calculating programs. After entering the numbers to be solved with a mathematical function, the program self-terminates. I can see for a flash of a second that it displays the answer, but it doesn't stay up long enough to get more than a subliminal seeming glance at it. I found a way to conquer the problem by making a "filler" input prompt, but i'm almost certain that this in unethical and not the permanent answer to my problem.
Question #2:
Code:
cout << "Insert message here/n";
When I have an output command and use the "/n" to create a break in the line, the program still displays the /n along with the message I want it to output. It acts as if it is ignoring the command. Again, I found a fix to the problem by adding:
...after a line, but again, I am sure this is unethical in the lines of proper programming.
Thanks for any assistance and for being patient with my noob-ness.