Mega Code Archive

 
Categories / C++ / Pointer
 

The actual data type of the value of all pointers is the same

#include <iostream> using namespace std; int main () {    int* intPointer;    float* floatPointer;    char *charPointer;    cout << "The size of intPointer is " << sizeof(intPointer) << endl;    cout << "The size of floatPointer is " << sizeof(floatPointer) << endl;    cout << "The size of charPointer is " << sizeof(charPointer) << endl;    return 0; }