1、roc曲线 http://www.zhizhihu.com/html/y2012/4076.html

2、using namespace std的缺点:程序中定义一个变量cout会被误认为是std::cout

3、cout<<left<<setw(5)<<"abc"<<endl;  使用setw必须包含#include<iomanip>

4、sizeof()计算变量在栈中分配的大小

  char q1[]="123"和char q2[]={'1','2','3'}区别

  sizeof(q1)=4;sizeof(q2)=3

char *str1=(char *)malloc(100);

  sizeof(str1)=4;

  

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
struct
{
short a1;
short a2;
short a3;
}A;
struct
{
long a1;
short a2;
}B; int main()
{
char *ss1=""; //
char ss2[]="";//
char ss3[]="";//
int ss4[];//
char q1[]="abc";//
char q2[]="a\n";//
char *q3="a\n";//
char q4[]={'','',''};
char *str1=(char *)malloc();
void *str2=(void *)malloc();
cout<<sizeof(ss1)<<endl;
cout<<sizeof(ss2)<<endl;
cout<<sizeof(ss3)<<endl;
cout<<sizeof(ss4)<<endl;
cout<<sizeof(q1)<<endl;
cout<<sizeof(q2)<<endl;
cout<<sizeof(q3)<<endl;
cout<<sizeof(q4)<<endl;
cout<<sizeof(A)<<endl;
cout<<sizeof(B)<<endl;
cout<<sizeof(str1)<<endl;
cout<<sizeof(str2)<<endl; return ;
}

最新文章

  1. 搞懂 SynchronizationContext(第一部分)【翻译】
  2. C#操作文件夹及文件的方法的使用
  3. 「zigbee - 1」工欲善其事必先利其器 - IAR for 8051 IDE customization
  4. [virsh] error: unknown OS type hvm解决办法
  5. Android Virtual Devices代理上网
  6. SPRING STS Virgo OSGI 开发一 : bundle 项目的创建
  7. jQuery实现购物车多物品数量的加减+总价+删除计算
  8. Linux企业级开发技术(7)——libevent企业级开发之锁和线程
  9. NodeJS热部署工具 — supervisor
  10. 如何得到iPhone手机的UUID
  11. DATAGUARD常用管理命令
  12. 游戏AI之感知(1)
  13. learning makefile foreach
  14. Java基础系列--final、finally关键字
  15. EL的隐含对象(一)【页面上下文对象】
  16. CentOS 7 host-only 设置上网
  17. 新生代老年代GC组合
  18. HDU 5618 Jam&#39;s problem again (cdq分治+BIT 或 树状数组套Treap)
  19. ios上线流程
  20. JavaScript第五天之数组

热门文章

  1. error C2872: “ACCESS_MASK”: 不明确的符号
  2. CSS中各种百分比(%)
  3. Django Shell 如何对数据库进行测试
  4. selenium之 文件上传所有方法整理总结
  5. vue2.0使用基础
  6. C++——Struct 和 Union区别
  7. PAT_A1088#Rational Arithmetic
  8. JavaMail API 发送电子邮件
  9. script标签的defer、async属性
  10. 用redis实现悲观锁(后端语言以php为例)