The black screen is flashing but it goes away immediately.
|
THAT is exactly the symptom I'm expecting. The program may be displaying your text, but it disappears immediately. This is because of how you are launching your program.
You're probably double clicking the executable? If so, that opens a "command line window", which closes immediately upon exit of the program. Instead, you'll need to either run in a debugger (I'll get to that), or you must open a command line window (a terminal in Linux/Unix/MAC), and run your application at the command line.
Now, IDE means "Integrated Development Environment". This could be Eclipse, IntelliJ, Visual Studio CE (If you're in Windows). This provides all all encompassing set of tools and a text editor for development, and it is likely you should use one to simplify things.
What operating system are you using? This guides which IDE is best to use (many are free).
A debugger, usually used within an IDE, is a way of watching the program execute, and examining it "from the inside out". It is "xray vision" for programming. A breakpoint is a "mark" you make in your code where you tell the debugger to pause your program at that point, so you can see what is happening. You can step through your code one line at a time while it is executing. There's hardly a better way to visualize and understand what you're writing. You need one.
Are you following a particular text in school? Don't take this the wrong way, but I have my own opinions and reservations about what is taught in schools, and how it is taught. So I have this advice.
Get a copy of Stroustrup's "C++: Principles and Practice". It is intended for you. Stroustrup uses it as a text to teach beginners (through intermediate), but you don't need a classroom to learn from it.
It will do all that your school might not. It will not tell you how to use and install an IDE (that is a separate goal), but with a suitable IDE aimed at C++, that book is a doctor's prescription for a 30 something walking your path (I'm a 50 something, been at this for decades...and trust me, they've released new versions of this language in 98/03/11/14/17 and now again for 20 - and I'm going back to school (personally) every time).
That book will help you excel in the class, make sense of what the teacher might not explain well (or know).
No matter what school teaches this stuff, the only way any of us ever actually become good programmers is self study. It has been so for decades. Even if you are a master at some point, it moves forward and we all must restudy. It gets faster and easier - there's just a "critical mass" you are still developing in your mind.
Be patient about this particular level of confusion. It fades with practice, just keep at it. It will not be a foreign language for long.