上一页 1 ··· 27 28 29 30 31
摘要: 1. length() size()都是表示 字符串 中的元素数, 等于begin()到end()之间的距离.length()是考虑到传统C函数 strlen而对应设置的,而size()是考虑到string作为一个STL容器2. length() sizeof()sizeof可以计算一个 类型 ... 阅读全文
posted @ 2014-07-29 12:44 2014acm 阅读(163) 评论(0) 推荐(0) 编辑
摘要: '\0'不是指ASCII码值, 它是字符, 它的ASCII码值是0'\0'==00 数字 48空格 ASCII码值是32main()... 阅读全文
posted @ 2014-07-29 12:31 2014acm 阅读(1467) 评论(0) 推荐(0) 编辑
摘要: %u为以无符号十进制输出 无符号整数能表示的数范围是0-65535,即对应的二进制数0-1111111111111111(16个1)。%ld表示按十进制长整型输出%x,%X无符号以十六进制表示的整数%u,格式化字符串时用的,u表示格式化为无符号整数(unsigned int) 举例来... 阅读全文
posted @ 2014-07-29 07:44 2014acm 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 输入nn 个数 最大数 最小数Input51 5 2 3 6Output1 6#include#includeusing namespace std;int main(){ int n, i, a[1000]; while(cin>>n) { for(i=0; i>... 阅读全文
posted @ 2014-07-28 23:58 2014acm 阅读(530) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;void f(int x){ if(x>x; f(x); return 0;}View Code#include using namespace std;void f(int x){if(x>x; f(x);ret... 阅读全文
posted @ 2014-07-28 23:42 2014acm 阅读(190) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31