Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
c++ x 16
Member Avatar for madt

program does not return the value entered #include <iostream> using namespace std; class testClass { public: int sum(); void print() const; testClass(); testClass(int a, int b); private: int x; int y; }; int testClass::sum() { int c; c = x + y; return c; } void testClass::print() const { cout …

Member Avatar for madt
0
140
Member Avatar for madt

the values are not being passed correctly, in my constructor i copy the value of d to decimalNum and the value of b to base. when i run the program the values are 0. what am i doing wrong?: baseType::baseType(int b, int d) { base = b; decimalNum = d; …

Member Avatar for madt
0
89
Member Avatar for madt

write a recursive function to convert a number in decimal to a given base b, where b is between 2 and 36. so far converts between 2 and 16 what must be added to convert between 2 and 36? [code]#include <iostream> using namespace std; void toBase(int n, int base) { …

Member Avatar for Dogtree
-1
102
Member Avatar for madt

i have the following for my operator overload [code]fraction fraction::operator+(const fraction& object)const { fraction temp; temp.a = a*object.b + b*object.a; temp.b = b * object.b; return temp; } fraction fraction::operator-(const fraction& object) const { fraction temp; temp.a = a*object.b - b*object.a; temp.b = b * object.b; return temp; } fraction …

Member Avatar for Dave Sinkula
0
247
Member Avatar for madt

I have the following assignment due: Design a class -say, fraction - that performs the arithmetic and relational operations on fractions. Overload the arithmetic and relational operators so that the appropriate symbols can be used to perform the operation. Also, overload the stream insertion and stream extraction operators for easy …

Member Avatar for Dave Sinkula
0
261
Member Avatar for madt

can someone help me with this, or just help get me started. write the definitions of the functions to overload the increment, decrement, arithmetic, and relational operators as a member of the class rectangeType. write a test program that tests various operations on the class rectangleType

Member Avatar for Dogtree
0
166