The output :Code:#include <iostream> #include <typeinfo> using namespace std; class point { int x, y ; public: point(int Ix, int Iy) : x(Ix), y(Iy) { } void show(void) { cout << "x = " << x << " y = " << y << endl; } }; int main(void) { point p1(3,3); point p2(99, 3922); cout << "point type = " << typeid(p1).name() << endl; cout << "point type = " << (typeid(p2)).name() << endl; cout << "int type = " << (typeid(int)).name() << endl; cout << "int type = " << typeid(int).name() << endl; cout << "unsigned int type = " << typeid(unsigned int).name() << endl; cout << "Press to continue ...." ; cin.get(); return EXIT_SUCCESS; }
point type = 5point
point type = 5point
int type = i
int type = i
unsigned int type = j
Press to continue ....
why is it 5point and not point ?
why the "unsigned int type = j" ? what is j ?
I am using bloodshed 4.9.9.2



LinkBack URL
About LinkBacks


