1)字符串操作strcpy(p,p1)复制字符串strncpy(p,p1,n)复制指定长度字符串strcat(p,p1)附加字符串strncat(p,p1,n)附加指定长度字符串strlen(p)取字符串长度strcmp(p,p1)比较字符串strcasecmp忽略大小写比较字符串strncmp(p...
分类:
编程语言 时间:
2014-10-14 13:52:58
阅读次数:
207
A + B
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12153 Accepted Submission(s): 7103
Problem Description
读入两个小于100的正整数A和B,计算A+B....
分类:
其他好文 时间:
2014-10-13 18:41:40
阅读次数:
166
- (NSData *)AES256EncryptWithKey:(NSString *)key {//加密
char keyPtr[kCCKeySizeAES256+1];
bzero(keyPtr, sizeof(keyPtr));
[key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8Str...
分类:
移动开发 时间:
2014-10-13 18:00:39
阅读次数:
270
1、位域变量符号位也占1bit,所以取1bit时需留意是否是无符号类型 2、位域变量不能取地址 3、初始化时,位域变量按定义顺序初始化,否则会有告警 4、static成员变量不在sizeof计算内 5、空类的sizeof值为1 6、有virtual函数的class,包含指向虚函数表的指...
分类:
其他好文 时间:
2014-10-13 02:27:08
阅读次数:
297
Problem Description
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resultin...
分类:
其他好文 时间:
2014-10-12 19:46:59
阅读次数:
205
在google官网下载google chrome deb包,有32位和64位之分:怎么判断系统是32位还是64位的,可以用以下代码:int a = 3;int *p = &a;printf("%d\n, sizeof(p));直接使用终端安装:1.按 Ctrl+Alt+T 打开终端: 切换到ch.....
分类:
系统相关 时间:
2014-10-12 13:33:18
阅读次数:
194
一, 运算符:连接操作数的一个符号,主要用于算术计算或者逻辑判断分类:1)参与运算的操作数的个数:单目运算(sizeOf() i++ 双目运算 三目运算 (条件运算符)2)功能上:算术运算符 关系和逻辑运算符 位运算符优先级:不同的运算符的计算先后顺序结合性:前提:优先级相同在优先级相同的情...
分类:
编程语言 时间:
2014-10-12 01:39:37
阅读次数:
426
HDU 5059 Help him
题目链接
直接用字符串去比较即可,先判断原数字正确不正确,然后写一个判断函数,注意细节,然后注意判掉空串情况
代码:
#include
#include
const int N = 105;
char n[N], a[N], b[N];
bool judge(char *str) {
int len = strlen(str);...
分类:
其他好文 时间:
2014-10-12 00:47:27
阅读次数:
294
class X{};class Y:public virtual X{};class Z:public virtual X{};class A:public Y,public Z{};使用sizeof在vs210上计算上面类的大小,计算结果如下 可以看到empty virtual base cla....
分类:
其他好文 时间:
2014-10-11 19:14:16
阅读次数:
284
//方案— 优点:仅使用C标准库;缺点:只能精确到秒级
#include
#include
int main( void )
{
time_t t = time(0);
char tmp[64];
strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A 本年第%j天 %z",localtime(&t) ); ...
分类:
编程语言 时间:
2014-10-11 17:15:35
阅读次数:
170