算术类型:整型(integral type)char : 一个机器字节(1BYTE =
8BIT)bool: 1 BIT整型: int:
与编译环境相关(不是机器),32位的编辑环境则长度为32BIT,故可以使用sizeof(int)来得到编译器环境的位数(返回的是字节长度)short/long/....
分类:
其他好文 时间:
2014-06-11 11:20:39
阅读次数:
175
#import const char *name =
class_getName([NSObject class]); printf("%s\n", name);void PrintObjectMethods()
{unsigned int count = 0;Method *methods = ....
分类:
其他好文 时间:
2014-06-11 10:51:59
阅读次数:
210
题意;每两种货币之间有一种汇率 给定货币种类与汇率
问一种货币能否经过兑换后价值增大思路:floyd算法的简单应用#include#includeusing namespace std;double
map[111][111];char s[33][111];int n;int get(char s...
分类:
其他好文 时间:
2014-06-11 10:46:08
阅读次数:
221
typedef struct 用法小结
typedef为C语言的关键字,作用是为一种数据类型定义一个新名字。这里的数据类型包括内部数据类型(int,char等)和自定义的数据类型(struct等)。在编程中使用typedef目的一般有两个,一个是给变量一个易记且意义明确的新名字,另一个是简化一些比较...
分类:
其他好文 时间:
2014-06-11 10:36:32
阅读次数:
298
char a[] = "hello";string s =
"hello";cout<<sizeof(a)<<endl;cout<<sizeof(s)<<endl;cout<<sizeof(s.c_str())<<endl;
输出为6324最后一个c_str返回的是char*,所有指针的长度都为4....
分类:
其他好文 时间:
2014-06-11 10:31:16
阅读次数:
234
第零章:扯扯淡
出一个有意思的题目:用一个宏定义FIND求一个结构体struct里某个变量相对struc的编移量,如struct student{ int a;
//FIND(struct student,a) 等于0 char b; //FIND(struct st...
分类:
系统相关 时间:
2014-06-11 10:23:14
阅读次数:
361
#include#include#define MAX_VERTEX_NUM 10typedef
char VertexType;typedef struct ArcNode//边 { int adjvex; struct ArcNode *nextarc;
in...
分类:
其他好文 时间:
2014-06-11 09:03:34
阅读次数:
277
class Solution {public: char *strStr(char
*haystack, char *needle) { if (haystack == NULL || needle == NULL) return NULL;
int wpos[25...
分类:
其他好文 时间:
2014-06-11 07:40:05
阅读次数:
200
1.client: 1 #include "iostream" 2 #include
"windows.h" 3 4 using namespace std; 5 void main(int argc,char* argv[]) 6 { 7
LPCTSTR Mess...
1 #include 2 #include 3 4 FILE* Freopen(const char
*fileName, const char *type, FILE *stream){ 5 FILE *fileFp = fopen(fileName,
type); 6 int f...
分类:
其他好文 时间:
2014-06-08 06:39:51
阅读次数:
247