search

Home  >  Q&A  >  body text

c++ - IDA Ctrl+F5生成的伪代码中字符串是几进制的?

比如这个字节,它的值是几进制的?该如何转为正常的字符串?

char *sub_1386F()
{
  if ( byte_146C8 != 104 )
  {
    byte_146C8 = 104;
    byte_146C9 = 116;
    byte_146CA = 116;
    byte_146CB = 112;
    byte_146CC = 58;
  }
  return &byte_146C8;
}

麻烦懂的大哥解释下这个伪代码。谢谢

高洛峰高洛峰2813 days ago601

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:30:02

    Actually, it is a decimal ASCII code. In C++, if you want to convert the ASCII code value into characters, you can use "" (backslash) + ASCII code.
    For example:

    #include<iostream>
    using namespace std;
    int main(){
       char a;//定义一个char类型变量
       a=104;
       cout<<a<<endl;
       cout<<"4"<<endl; //你在运行时会发现两个都是一样的
    }

    reply
    0
  • Cancelreply