⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 string.edp

📁 FreeFem++可以生成高质量的有限元网格。可以用于流体力学
💻 EDP
字号:
//  bug string macro parameter   version < 1.41// bug in string parameter version before <2.5// ----------------- macro tyty(uu) uu//  cout << tyty("toto") << endl;func string   write(string  fn,real[int] & u){  cout <<"write :   " <<  fn << " u = "<<  u << endl;  //  delete 2 times before version 2.5   return fn; }func string   write1(string  fn,real[int] & u){  cout << "write 1 " << fn << " u = " << u << endl;     string toto=fn; ;  return toto+"dfsdf"; }real[int] u(3);u=1;string tt=tyty("toto1"+1+" -- 77");string t1="0123456789";// write(tt,u);string t2;  {    t2=  write1(t1,u)+write1(tt,u); //     // because the local variable of write1 are  delete 2 times at the  ;    cout << " t2 = " << t2 << endl;  }if(0)   { // the correct way     t2=  write1(t1,u);     t2=t2 + write1(tt,u);     cout << " t2 = " << t2 << endl;   }// new operatort2 ="12340005678";t2(4:3) = "abcdefghijk-"; //t2 = "12340abcdefghijk-005678";cout << t2 << endl;cout << "  find abc " << t2.find("abc") << endl;cout << "r find abc " << t2.rfind("abc") << endl;cout << " find abc from 10  " << t2.find("abc",10) << endl;cout << " ffind abc from 10 " <<t2.rfind("abc",10) << endl;cout << "   " << string("abcc").length << endl; {  // add getline version 3.0-6 jan 2009 FHstring s;ifstream toto("xyf");for (int i=0;i<10;++i)  {   getline(toto,s);   cout << i << " : " << s << endl;  }} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -