随笔分类 - C++
摘要:#include <string.h>#include <vector>#include <algorithm>#include <string>#include <iostream>using namespace std;void main(){ string m("----------asdfas--------------dfgdf---------"); string::iterator it; vector<char> csr; vector<char>::iterator cit
阅读全文
摘要:#include <iostream>#include <string>#include <fstream>#include <iomanip>using namespace std;int main(){ ofstream fs("123.txt",ios::app); fs<<setw(7)<<"234234"<<setw(3)<<"12"<<endl; system("pause"); return 0
阅读全文
摘要:#include <iostream>#include <string>using namespace std;int main(){ string a,b; a="Dsp"; b="Tian"; char temp[5]; string ab; for(int i=0;i<13;i++) { sprintf(temp,"%d",i); ab=temp; cout<<a+ab+b<<endl; } system("pause"); return 0;}
阅读全文
摘要:#include <stdio.h>typedef void (* FP)(unsigned int a,unsigned int b);//void DataDeal(FP PCB);//void PointerReceive(unsigned int a,unsigned int b);//void Pointer(unsigned int a,unsigned int b);////////////////////////////////////////////////////////////////void Pointer(unsigned int a,unsigned i
阅读全文
摘要:#include <iostream>using namespace std;void malo(double **p){ *p =new double; double *w=new double[10]; for (int i=0;i<10;i++) { w[i]=2*i; } *p=w;}void main(){ double *m=NULL; malo(&m); for (int i=0;i<10;i++) { cout<<m[i]<<""; } delete[] m; syst...
阅读全文

浙公网安备 33010602011771号