I tried to write a program that outputs all numbers from 1 to 1000 that have prime factors which add up to a prime number (it's an exercise in the book Jumping Into C++)
I've finished the program, and it seems correct, but each time I run it I get an alert saying the program has stopped working, and then a line saying "Process Returned 255 (0xFF)" appears on the console. I use the Code::Blocks IDE, but I then tested it with Dev-C++ and VC++ and got the same errors.
I tried to find a solution to this elsewhere, but everything I found was for more complex programs that I didn't understand.