I tried to print the size of int pointer on a 64 bit windows 7 machine. I am using cygwin. I expected it to give output 8, but the actual output is 4.
#include <iostream>
using namespace std;
int main()
{
cout<< sizeof(int*)<<endl;
return 0;
}
Possibly related question What the pointer size in 64 bits computer in C++?
But it is about compiling as 64 bit project in Visual Studio. I couldn't find any such option in cygwin. How is this explained?