You cannot do it. You need to pass the array length along with the array pointer, or you need to use a container object such as std::vector .
www.google.com.tw