int a = 0 and int a(0) differences [duplicate]

int a = 0; and int a(0); make no difference in the machine generated code. They are the same.

Following is the assembly code generated in Visual Studio

int a = 10;   // mov dword ptr [a],0Ah  
int b(10);    // mov dword ptr [b],0Ah  

Leave a Comment