Question: I'm trying to write a simple addition program in c++ using ubuntu that takes two numbers from a class in the header file and simply

I'm trying to write a simple addition program in c++ using ubuntu that takes two numbers from a class in the header file and simply adds them up and displays them in the main file. Here is what I have so far:

header file: header.h

#ifdef MYHEADER_H_

#define MYHEADER_H_

using namespace std;

class myClass {

private:

int x, y;

public:

addNums();

int addNums(x , y);

};

#endif

I am not sure what to write in the source or main files to get this to work. Thanks for the help!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!