摘要:#include <bits/stdc++.h> #include <string> using namespace std; string s; int main() { getline(cin,s); cout<<s<<endl; /* fsw sf fsw sf */ cin>>s cout<<s<<endl; fsw sf fsw return 0; }
阅读全文
摘要:#include using namespace std; const int N = 1010; int main(){ char str[256] = { 0 };//str的大小(256)一定要填的。 int data = 1024; /* //将data转换为字符串 sprintf(str,"%d",data); cout #includ...
阅读全文
摘要:判断字符变量c是否为字母或数字,若是则返回非零,否则返回零。
阅读全文
摘要:只能是0 ,-1,0x3f3f3f3f (1e9)
阅读全文
摘要:int a[8]={1,2,3,4,5}; int p=lower_bound(a,a+5,6)-a; cout<<p<<endl;//5 set<int>s; set<int>::iterator it; s.insert(3); s.insert(2); s.insert(1); s.inser
阅读全文
摘要:1 #include 2 3 int main(void) 4 { 5 int a[5] = {1, 2, 3, 4, 5}, b[5]; 6 /*第一个参数是要保存的位置的起始地址,所以我们直接放b 7 *第二个参数是源数据的起始地址,所以我们把a放上去 8 *第三个参数是要复制的内存块的长度,为a的长度sizeof(a)*/ 9 ...
阅读全文
摘要:1 https://www.cnblogs.com/nysanier/archive/2011/04/19/2020778.html 2 3 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 using namespace ...
阅读全文