What\'s the difference between inline function and then main like so:
inline double cube(double side)
{
return side * side * side;
}
int main( )
{
cu
The 3 program compile to exactly the same with g++ -S -O3 $file.cc.
Except for the second example where the definition of double cube(double side) still exist in a non inlined form though inlined in int main().
_main:
pushl %ebp
movl $16, %eax
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
call __alloca
call ___main
leave
xorl %eax, %eax
ret