Now I\'m talking about new type definition by a programmer using typedef keyword. As long as my pupils are used to the type size_t (for example by using function length ()),
Just for completeness, have you considered simply asking C++ about size_t?
#include
#include
#include
int main()
{
std::cout << "sizeof(size_t) = " << sizeof(std::size_t) << std::endl;
std::cout << "is size_t an integer? " <<
(std::numeric_limits::is_integer ? "yes" : "no")
<< std::endl;
std::cout << "is size_t signed? " <<
(std::numeric_limits::is_signed ? "yes" : "no")
<< std::endl;
}
gives me
sizeof(size_t) = 8
is size_t an integer? yes
is size_t signed? no