How to create C++ built-in type

Klesk kleskmail@gmail.com
Sun Aug 16 13:51:00 GMT 2009


Hi

C++ has many built-in types (int, float etc.), how to create a new
built-in type for example - how to make 'Test' defined as struct:
'Test { int a,b; };' built-in type, so that for example this code
would be correct:

int main()
{
   int x = 100;
   Test z;  // it's not defined, but it's built-in type so it should be OK
   z.a = x;
   return 0;
}

-- 
Klesk



More information about the Gcc-help mailing list