when I compile, there are no errors, but when I run the program it tells me there are build errors and then "the system cannot find the file specified." I have copied and restarted a new project, then new item and still get same error message. Can someone tell me what the error is? Thanks.
#include <iostream>
using namespace std;
class testClass
{public:
int sum();
void print();
testClass();
testClass(int a, int b);
private:
int x;
int y;
};
int testClass :: sum ()
{return x + y;}
testClass :: testClass (int a, int b)
{ x=a, y=b ; }
testClass :: testClass ()
{ x=0, y=0 ; }
void print ()
{cout << "Sum of one, a + b = " << endl;
cout << "Sum of two, a + b = " << endl;
}
/* an entry point for program execution */
int main()
{
testClass one; //default constructor called
testClass two (2,2); //constructor with 2 values called
one.print();
two.print();
}