Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started