Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

b. Did you suppress any of your anger? Explain.

Answered: 1 week ago