- 博客(15)
- 收藏
- 关注
转载 c++ 中 static 成员 和 函数
好处: 对象共享变量,属于类的。 关键点: 成员声明和定义的位置。 静态函数没有 this 指针。 转载于:https://www.cnblogs.com/yetanghanCpp/p/9511874.html...
2018-08-21 15:56:00
112
转载 Memory Layout for Multiple and Virtual Inheritance
Memory Layout for Multiple and Virtual Inheritance Warning. This article is rather technical and assumes a good knowledge of C++ and some assembly language. In this article we explain ...
2018-07-10 14:05:00
101
转载 covariant return type in override
1 #include <iostream> 2 3 class Base 4 { 5 public: 6 // This version of getThis() returns a pointer to a Base class 7 virtual Base* getThis() { std::cout << "...
2018-07-09 10:57:00
133
转载 Using-declaration
Two function: In namespace and block scope Using-declaration introduces a member of another namespace into current namespace or block scope #include <iostream> #include <string>...
2018-07-03 13:59:00
351
转载 Copy constructors, Assignment operators, and Copy assignment operator
1 #include <cassert> // for assert() 2 #include <initializer_list> // for std::initializer_list 3 #include <iostream> 4 5 class IntArray 6 { 7 private: 8 ...
2018-06-28 11:26:00
121
转载 Question : New int[0] and Sizeof on dynamically allocated memory
Sizeof on dynamically allocated memory delete []does know the size that was allocated. However, that knowledge resides in the runtime or in the operating system's memory manager, meaning that...
2018-05-31 11:20:00
84
转载 Copy constructors, assignment operators, and exception safe assignment
Copy constructors, assignment operators, and exception safe assignment link: http://www.cplusplus.com/articles/y8hv0pDG/ // copy constructor Myclass::Myclass(const Myclass& myclass) { ...
2018-05-24 19:19:00
113
转载 Memory of a c program
Memory Layout of C Programs A typical memory representation of C program consists of following sections. 1. Text segment2. Initialized data segment3. Uninitialized data segment4. Stack5. Heap...
2018-04-27 11:01:00
146
转载 c++ / c 数值类型的一些感悟
Contrary to the other answers, there is no undefined behavior here, and there is no overflow. Unsigned integers use modulo 2narithmetic. Section 4.7 paragraph 2 of the standard says "If the des...
2018-04-25 15:31:00
66
转载 C++ / C include 头文件问题
As a newbie programmer, i sometimes encouter the failure that the header files include each other. This article will illustrate why and how to solve this probleam Why we need header file (1) I...
2018-04-19 09:05:00
400
转载 c standard I/O library
the standard C I/O library: C标准库提供了文件的标准 I/O 函数库,相比前述的系统调用,主要差别是实现了跨平台的用户态缓冲的解决方案。标准I/O库使用简单,与系统调用I/O相似,也包括打开、读写、关闭这些操作,主要的函数列举如下。 ◆ oritened buffering:fwide。◆ 打开与关闭文件:fopen,freopen, fdopen, f...
2018-04-13 14:49:00
152
转载 SomeThing what i discover
1. 指针常量 int a[3] = {1, 2, 3}; const int *b = a; b[0], b[1], b[3] 都是 read_only location 转载于:https://www.cnblogs.com/yetanghanCpp/p/8806196.html
2018-04-12 10:54:00
80
转载 静态库 和 共享库(动态库)
linux 下,创建静态库: ar -rcs libname file.o(目标代码)…… -r : 插入和替换。 -c :没有静态库就创建。 -s :创建索引。 转载于:https://www.cnblogs.com/yetanghanCpp/p/8655990.html...
2018-03-27 10:16:00
107
转载 Files and Directoies
start 2017/01/09 Introduction: 文件系统的特性和文件的属性:查询/修改,学习链接,操作文件夹。 4.1 stat, fstat, fstatat and lstat Functions // 很重要 #include< sys/stat.h> int stat( const char* restrict...
2018-01-09 19:46:00
102
转载 Section 3 文件IO
starting: 2017/12/12 3.1 introduction describing the function available for file I/O.Most file I/O on Unix system can be performed using only five functions: open, wirte, lseek, and close. Th...
2017-12-24 11:58:00
103
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人