well as far as I can tell your program does SOMETHING.... problem is, you don't let it interact with the user enough to tell what it does. try adding a few debugging print statments here and there to see what your program is doing (or load it into a debugger and trace it step by step... but I think a few cout line will work here).
You really should try to avoid the goto statment.
lets look at a bit of your code:
CODE
//Here is the lable that you use with your goto...
top: // Questions
cout << "Welcome to Programming Assignment 5! The final instalment for the Spring 2007 semester" << endl;
cout << "Input the range you would like to find the prime integers with: " << endl;
cin >> N; // N is the ending integer to find the prime numbers
primArray = new long[ N ]; // declares the primArray array.
if (N < 1)
{
cout << "Error! Cannot be less than 1!" << endl;
goto top;
/* MEMORY LEAK!!!
*if the user enters N<1 then a new array will be made,
*and the old one is not removed... */
}
else
{
goto primeCheck;
}
lets code that using safer practices:
CODE
top:
do
{
cout << "Welcome to Programming Assignment 5! The final instalment for the Spring 2007 semester" << endl;
cout << "Input the range you would like to find the prime integers with: " << endl;
cin >> N; // N is the ending integer to find the prime numbers
} while (N<1); //loop until the user gets it right.
primArray = new long[ N ]; // declares the primArray array.
Now the array is only declared once, no matter how thick headed the user (though if the user chooses TOO large and array there might be trouble).