If your using asm why don't you just compile it MASM? Instead of trying to compile it Visual C++.
-.- You want to write ASM(BYTE) code into a program, or you want to execute ASM code within you C++ code?
If you want to write a code cave, you should know at least the basics of ASM, seeing as the code cave will be programmed in ASM, then you have to convert the ASM code you wrote into bytes, then use the WriteProcessMemory API call to write them.
Umm..Thats called executing ASM code in your C++ code\project.