自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

转载 Cpp问号冒号

int main(){ int a=2,b=4,max; max=(a>=b)?a:b;//如果a大于等于b,则把a的值放到max中,否则把b的值放到max中return 0;}改写: if(a>=b){ max = a; }else{ max =b; }再...

2019-09-17 23:27:00 1176

转载 刷题碰到的二级指针运用

题目大致是:void Func(char* p){void Func(char* p){ p=(char*) malloc(100);}/////////////////////////////////////////////////////////////////////////////////////int main() {char...

2019-09-16 22:20:00 92

转载 temp read

https://wowwiki.fandom.com/wiki/WoW_AddOn转载于:https://www.cnblogs.com/sunchuankai/p/11512031.html

2019-09-12 15:12:00 241

转载 move semantic/ r-value /L-value (copy from stakcoverflow)

class string{ char* data;public: string(const char* p){ size_t size =std::strlen(p)+1; data =new char[size]; } ~string(){ delete[] data; ...

2019-09-09 23:55:00 175

转载 static/dynamic cast

#include <vector>#include <iostream>struct B { int m = 0; void hello() const { std::cout << "Hello world, this is B!\n"; }};struct D : B { void hello() cons...

2019-09-08 00:42:00 95

转载 upcast/downcast C++

e.gclass A{public: virtual const char* getName() { return "A"; }}; class B: public A{public: const char* getName() { return "B"; } // note: not virtual}; class ...

2019-08-06 19:43:00 464

转载 C++ 笔记

本博客主要记录工作中和学习中遇到的C++问题,不定时更新Object slicing:引用下stackoverflow上的例子:class A { int foo;};class B : public A { int bar;};So an object of typeBhas two data members,fooan...

2019-07-26 18:02:00 53

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除