xj qian
2024-06-27 51faca7cff4ce6b848fcbd8f7fe881f6fc59b4f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
 
//#include <stdio.h>
//#include <stdlib.h>
//#include <tchar.h>
//#include <memory.h>
#include "system/base.hpp"
#include "xstring.hpp"
 
class xint
{
private:
    int value;
public:
    xint(int val = 0) :value(val) {}
    xint(double val) :value((int)val) {}
    xint(xstring val) :value(val.toInt()) {}
public:
    operator int() { return value; }
    double toDouble() { return (double)value; }
    xstring toString() { return xstring(value); }
};