Hello everybody!
I'm trying to create a class calling INT, that is equivalent to the type int. I really don't know exactly what're inside class int. What I know is int is a type. I think what I need to do is create a class with operators like: +, -, *, / , %, x^y, ...
May you get me started?
Thank you in advanced!

Such a class would keep all the digits as a vector, array or linked list of characters, and you could make it so that it has no upper or lower limit to the number of digits it can hold.

>>May you get me started?

Certainly -- here goes

#include <string>
#include <vector>
using std::string;
using std::vector;

class INT
{
   INT& operator+(INT& i);
   // other operators here
private:
   vector<char> digits;
};
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.