Considering the cost, are these cases the same?
// case 1 int a = 5; // case 2 int a (5); // case 3 int a; a = 5
First and second are exactly same as both are initialization. Third one is different, as this is assignment. These differences are as per the C++ Standard. However, the compiler can treat all three as same!