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