随笔分类 -  c++

摘要:#include <iostream> using namespace std; int main() { for(int i=1;i<=9;i++){ for(int j=1;j<=i;j++){ cout<<j<<"x"<<i<<"="<<j*i<<" "; } cout<<endl; } re 阅读全文
posted @ 2022-11-25 18:40 chenruolin1 阅读(18) 评论(0) 推荐(0)
摘要:#include <iostream> #include <string> using namespace std; int main() { string a; string str="a:=3;b:=4;c:=5;"; int index=str.find(";"); a=str.substr( 阅读全文
posted @ 2022-10-29 20:19 chenruolin1 阅读(10) 评论(0) 推荐(0)
摘要:#include <iostream> #include <string> using namespace std; int main() { string str="雷猴,我是李玉波,我今年上八年级;"; //replace是替换的意思 //一个汉字是两个字符 str=str.replace(st 阅读全文
posted @ 2022-10-29 20:18 chenruolin1 阅读(10) 评论(0) 推荐(0)
摘要:#include <iostream> #include <string> #include "minecraft.h" using namespace std; TxMinecraft mc; int main() { bool con=mc.ConnectMinecraft("zk.makebl 阅读全文
posted @ 2022-10-15 16:27 chenruolin1 阅读(11) 评论(0) 推荐(0)
摘要:#include <iostream> #include <fstream> using namespace std; int main(int argc, char** argv) { char data[100]; ifstream infile; infile.open("me.txt"); 阅读全文
posted @ 2022-10-02 08:19 chenruolin1 阅读(27) 评论(1) 推荐(0)
摘要:#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream readfile; readfile.open("八卦图数据源.txt"); string str; 阅读全文
posted @ 2022-10-02 07:56 chenruolin1 阅读(23) 评论(2) 推荐(0)