not void.. int
sorry
C++ interview questions and pitfalls
quote:Original post by PaladinGLT
Adding one to a number w/o +''s or -''s... thats soo easy =P
#include <iostream.h>
void main()
{
int myint=50;
__asm
{
mov eax, myint
add eax, 1
mov myint, eax
}
cout << myint; // will be 51 =)
}
why not
#include <iostream.h>
void main()
{
int myint=50;
__asm
{
add myint, 1
}
cout << myint; // will be 51 =)
}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement