![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
feng1456
热爱技术,勤于学习,乐于分享!
展开
-
C++ Static Library 和 Shared Library 的区别
转载 2021-01-22 19:13:04 · 2163 阅读 · 0 评论 -
C 获取内存信息并输出
headfile.h#include #include #include #define TRUE 1#define FALSE 0#define MAX 10000typedef int KeyType;typedef int OtherType;typedef struct{ KeyType key; OtherType other_data;}R原创 2015-04-11 08:20:27 · 1811 阅读 · 0 评论 -
C++语言知识汇集 - 02
1.引用1)引用不是变量2)引用仅仅只是变量的别名3)引用没有自己的独立内存空间4)引用要与它所引用的变量共享内存空间5)对引用所做的改变实际上是对它所引用的变量的改变6)引用在定义的时候要初始化7) 引用一经初始化不能够重新指向其他变量#include using namespace std;void main(){ int val = 100原创 2015-01-25 13:30:28 · 727 阅读 · 0 评论 -
C++ 语言知识汇集 -03
类型转换1.static_cast最常用的类型转换符,在正常状况下的类型转换,如把int转换为float,如:int i;float f; f=(float)i;或者f=static_cast(i);2.const_cast用于取出const属性,把const类型的指针变为非const类型的指针,如:const int *fun(int x,int y){} int *ptr=c原创 2015-01-25 13:54:09 · 568 阅读 · 0 评论 -
C++ 语言知识汇集
1.boolbool result = true;bool flag = false;bool r = 100;cout<<"value of result is : " <<result<<endl;cout<<"value of flag is : " <<flag<<endl;cout输出:1,0,1总结: true为1,false为0,非0值为true,0为false原创 2015-01-25 10:26:09 · 579 阅读 · 0 评论 -
C++ 结构体定义及使用
结构体定义及使用例子!#include #include using namespace std;struct MyStruct{ int year; int month; int day;};struct Employee{ int id; string name; MyStruct birthday;};void main(){ cout << si原创 2015-01-30 14:09:09 · 747 阅读 · 0 评论 -
C++ 通过指针实现多态
1.父类(DBConnector)1)DBConnector.h#include using namespace std;class DBConnector{private: string name;public: DBConnector(); DBConnector(string _name); ~DBConnector(); void show();};2)原创 2015-01-29 20:01:23 · 915 阅读 · 0 评论 -
指针C语言-很好的教程
Summary: this tutorial introduces you to C pointer, which is an important concept in C programming language. Pointers give you a flexible and powerful way of manipulating data in your programs.Intro转载 2014-12-01 22:53:12 · 666 阅读 · 0 评论 -
链表C语言-很好的教程
in this tutorial, you will learn aboutC linked list data structure and how to implement the most commonly used linked list operations.1 Introduction to linked list data structure2 C Linked Lis转载 2014-12-01 22:32:03 · 2228 阅读 · 1 评论 -
vim 及gcc 指令
1.创建vim 文件名2.保存退出esc + :wq3. gcc -E source_file.c-E,只执行到预编译。直接输出预编译结果。4. gcc -S source_file.c -S,只执行到源代码到汇编代码的转换,输出汇编代码。5. gcc -c source_file.c-c,只执行到编译,输出目标文件。6. gcc (-E/S/c/) sou原创 2015-01-25 16:13:55 · 1391 阅读 · 0 评论 -
C语言字符类型和整数类型的通用性
字符型数据与整型数据是通用的向字符变量赋予整数#includevoid main(){char c1,c2;c1=97;c2=98;printf("%c %c/n",c1,c2);printf("%d %d/n",c1,c2);}大小写字母的转换#includevoid main(){char c1,c2;c1='a';c2='b转载 2014-11-24 23:49:10 · 1723 阅读 · 0 评论 -
windows 消息机制
1.关于windows消息机制消息就是windows发出的一个通知,告诉程序某个事情发生了。例如,单击鼠标、改变窗口大小等。消息本身是以一个记录的形式传递给程序的,这个记录(在C/Java中称为结构体)包含了消息的类型和其他信息。例如,对于鼠标单击事件来说,这个记录(结构体)包含了单击事件的消息号(WM_LBUTTONDOWN),数据的坐标(x,y)等信息,这个记录叫TMsg。在C语言原创 2014-11-27 21:37:29 · 596 阅读 · 0 评论