码迷,mamicode.com
首页 >  
搜索关键字:sizeof    ( 5917个结果
字典树模板(HDU1251)
struct node{ int Count; node *next[26]; node(){ //初始化数据 memset(next,NULL,sizeof(next)); Count=0; } }; node *p,*root=new node(); void Insert(char *s)//插入新单词 { int i...
分类:其他好文   时间:2015-01-05 14:53:58    阅读次数:237
UVA 1225 字符串处理
背景:无。#include #include int main(void){ int t,str[10]; scanf("%d",&t); while(t--){ int n; memset(str,0,sizeof(str)); scanf("%d",&n); for(int i=1;i<=n;i++){ if(i/1000) {str[i/1000]...
分类:其他好文   时间:2015-01-05 13:03:06    阅读次数:892
无数据成员类的 sizeof 大小一题
1、问题描述写出代码中sizeof的结果#include #include using namespace std;class A1 { A1() {} ~A1() {}};class Base {public: Base () { cout ) { cout << "Derive...
分类:其他好文   时间:2015-01-05 09:27:11    阅读次数:227
POI2012
现在才开始写 POI 是不是太弱了?-Rendezvous怎么说呢,我发现我的代码好长啊~长啊~长啊~长长长长长长长长长长长长长长长长长长长长长长啊~大概就是在一个内向树上搞一个类似 lca 的东西,想想内向树估计就可以搞出来了吧…… 1 #include 2 const int sizeOf...
分类:其他好文   时间:2015-01-04 21:18:33    阅读次数:314
随手记
1 - #define PARAM_MAP_SIZE(MAP) (sizeof(MAP)/sizeof(MAP[0])) sizeof(s)是元素的总字节数,sizeof(s[0])是第一个字符的字节数。算下来就是这个数组的字符个数。
分类:其他好文   时间:2015-01-04 18:47:14    阅读次数:116
一切为了笔试~
1//sizeof的使用2chara[30]="abcde";3char*b=newchar[20];4cout<<sizeof(a)<<endl;//305cout<<sizeof(b)<<endl;//46cout<<sizeof(a[3])<<a[3]<<endl;//17cout<<size...
分类:其他好文   时间:2015-01-04 15:00:44    阅读次数:127
华为机试—频率最小的字符
输入一个字符串,输出出现次数最少,或者说出现频率最小的字符。 #include #include using namespace std; int main() { string s; cin>>s; int fre[26]; memset(fre,0,sizeof(fre)); for (int i=0;i<s.size();i++) fre[s[i]-'a']+...
分类:其他好文   时间:2015-01-04 10:04:53    阅读次数:151
名字的漂亮度
#include #include #include using namespace std; int main() { int chArray[26] ; memset(chArray, 0, 26*sizeof(int)); int N =0; string s; cin>> N; while (N--) { memset(chArray, 0, 26*sizeof(i...
分类:其他好文   时间:2015-01-03 21:06:15    阅读次数:241
[AaronYang]C#人爱学不学[6]
不要回头,不要将就,做到这两点,人生就会简单很多幸福很多--Aaronyang的博客(www.ayjs.net)-www.8mi.me1. 运算符,还有哪些你能学到?1.1 不安全运算符: sizeof(.net framework1.0和1.1中的)、*、-> 、&1.2 checked和unch...
分类:Windows程序   时间:2015-01-03 02:01:46    阅读次数:242
指针与指向指针的指针
刚学习数据结构的时候,这个问题让我困惑了很久,举个例子:#include<stdio.h>#include<malloc.h>typedefstruct{intloc;}stc;voidalterInfo(stc*s){s=(stc*)malloc(sizeof(stc));}voidalterInfo2(stc**s){*s=(stc*)malloc(sizeof(stc));}intmain(void){stc*st=(stc..
分类:其他好文   时间:2015-01-01 18:42:33    阅读次数:180
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!