Can't output int as result of sizeof()
问题 I'm lloking to write a program in C++ which will sync two directories for me, and for part of it I need to get the size of an char array. The code I'm using is below #include <iostream> #include <Windows.h> using namespace std; int main() { char binaryPath[MAX_PATH]; GetModuleFileName(NULL, binaryPath, MAX_PATH); int r = sizeof(binaryPath); return 0; } Anyway, that code compiles and runs fine. The problem comes when I try and cout the binaryPath variable. In the main block, after the