S
S
SKEPTIC2019-03-29 15:15:43
C++ / C#
SKEPTIC, 2019-03-29 15:15:43

Assembler inserts in C++?

I'm doing an assembler insert in C++.
I want to get a value from memory, write it to a variable, but it returns an error.

#include "pch.h"
#include <iostream>
using namespace std;

void main()
{
  int a;

  __asm
  {
    push eax
    mov eax,DWORD PTR[117C4610]
    mov a,eax
  }
  cout << a << endl;
  system("pause");
}

Error: Error C2041 invalid digit "C" for base "10"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-03-29
@pro100chel

Alternatively, add mb 0x at the beginning. Or just convert to decimal and score.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question