When I try to run something I make in C++, it won't work. The code has no errors or anything. I see the command prompt pop up for like a nanosecond but then it goes away and nothing happens. I'm using Dev-C++ to create, compile, and run.
You need a break at the end of your code so it doesn't just run and close out right away. Make a dummy variable and toss a cin in there at the end, so the program will stay open until you hit enter.
If your just trying to get some information on the screen and you wanna see what the program does, just toss this in at the end of the program, before the exit or return line:
char trash;
cin>>trash;
Then when the program runs, it will do whatever your program does up to the cin line, then just type in any character and hit enter and the program will end. Just do this for now until you learn more about programming and you can do something fancier later.