You might probably want to start from a standard library reference (and some resources explaining the basics of C++).
Functions that will return information about those things (Length, Values, data type used, etc..)
I'm afraid C++ is statically typed, so that information is all already there in the code. Normally you can't get that info (in a way that you can use it for something useful) and don't need it.
Only in template context you may sometimes need to get some type information. For that, containers for example have several typedefs, e.g
Code:
#include <vector>
template <class Container>
void foo(const Container& container)
{
//declare a variable that has the same type that the container holds
typename Container::value_type var;
}
int main()
{
std::vector<int> vec;
foo(vec); //var in foo will be int in this case
}
Also, iterators have means to find out what types they are for, e.g
Code:
#include <iterator>
template <class Iterator>
void foo(Iterator it)
{
//declare a variable that has the same type as the iterator iterates over
typename std::iterator_traits<Iterator>::value_type var;
}
int main()
{
const char* p = "Hello world";
foo(p); //var should be of type char
}