Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define POS false
- #define NEG true
- StringInt::StringInt(long int num)
- {
- this->init(abs(num));
- this->sgn = (num < 0) ? NEG : POS;
- }
- //comment
- StringInt::StringInt(unsigned long int num)
- {
- this->init(num);
- }
- void StringInt::init(unsigned long int num)
- {
- std::stringstream out;
- out << num;
- this->strint = StringInt::rvrs(out.str()); // reverse string
- this->sgn = POS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement