I want to implement a class that can handle numbers that are arbitrarily large. I know i can use other libraries like BigInteger but i just wanted to implement my own thing as practice.
My header file:
#ifndef INT_H
#define INT_H
//#ifndef vector
#include <vector>
class Int{
private:
vector<int> v;
public:
Int();
Int(int);
void clear();
void push_back();
void resize();
vector<int>::iterator begin();
vector<int>::iterator end();
int size();
void sum(Int &, Int, Int);
void sub(Int &, Int, Int);
void prod(Int &, Int, Int);
Int operator+(const Int &);
Int operator-(const Int &);
Int operator*(const Int &);
Int operator>(Int &);
Int operator<(Int &);
Int operator>=(Int &);
Int operator<=(Int &);
int& operator[] (Int);
};
//#endif // vector
#endif // INT_H
The problem is it gives me an error on the first encounter of vector on line 9, namely "expected unqualified-id before '<' token"
Any help would be very appreciated.
Edit: Confused define with include. Now i get vector does not name a type