摘要:
对于char *s1 和 char s2[] 认识有误区(认为无区别),导致有时出现“难以理解”的错误。char *s1 = "hello"; char s2[] = "hello";【区别所在】char *s1 的s1,而指针是指向一块内存区域,它指向的内存区域的大小可以随时改变,而且当指针指向常... 阅读全文
posted @ 2014-08-01 11:22
SSSSSIU
阅读(901)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 #include //使用 assert.h 中的 assert 宏来限制非法函数的调用; 5 using namespace std; 6 7 // 判断是否为素数 8 int is_prime(int x) ... 阅读全文
posted @ 2014-08-01 10:40
SSSSSIU
阅读(244)
评论(0)
推荐(0)

浙公网安备 33010602011771号