小码哥C++
..无尽光芒..
这个作者很懒,什么都没留下…
展开
-
小码哥C++_面向对象
类C++中可以使用struct、class来定义一个类#include<iostream>using namespace std;//class Person {// //成员变量// int age;// //成员函数// void run() {// cout << "Person is running" <<age<<endl;// }//};struct Person { int age; //C++ struct可以原创 2020-08-27 20:39:41 · 213 阅读 · 0 评论 -
小码哥C++_反汇编分析
反汇编分析#include<iostream>using namespace std;int main() { int a = 1; int b = 1; int c = a + b; return 0;}这一段代码反汇编得到以下汇编代码:int a = 1; mov dword ptr [ebp-8],1 int b = 1; mov dword ptr [ebp-14h],1 int c = a + b; mov原创 2020-08-26 23:05:21 · 260 阅读 · 0 评论 -
小码哥C++_汇编指令
汇编_call指令我们先来随便写一个函数,然后反汇编看看它的代码。#include<iostream>using namespace std;void test() {}void func() {}int main() { test(); func();}转到汇编为:再按一下F11再按一下F11,跳转到函数:存储字节int a=1;//ebp-0Ch是变量a的地址//word 2字节 dword 4字节 qword 8字节mov dword pt原创 2020-08-26 19:38:31 · 483 阅读 · 0 评论 -
小码哥C++:第一课
小码哥C++:第一课标准格式#include<iostream>using namespace std;int main() { int age; cin >> age; cout << "age is " << age << endl; return 0;}2.函数重载C语言中不支持函数重载,但大多数语言中都支持函数重载#include<iostream>using namespace std;/原创 2020-08-26 15:18:37 · 276 阅读 · 0 评论