Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/126.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
该程序没有';输出后不结束 我使用Turbo C++,我自己试着做一个程序。我有很多问题和很多错误,我浏览了整个网站,解决了除了这个问题以外的所有问题。程序运行并显示输出后,程序不会结束。Ctrl+Break也不起作用,我只能关闭它并再次运行。有人能帮我吗 #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> int n; void disp() { cout<<"\tPERIODIC TABLE OF THE s-BLOCK ELEMNTS\n"<<endl; cout<<"\t1\n\tH\n"<<endl; cout<<"\t3\t4\n\tLi\tBe\n"<<endl; cout<<"\t11\t12\n\tNa\tMg\n"<<endl; cout<<"\t19\t20\n\tK\tCa\n"<<endl; cout<<"\t37\t38\n\tRb\tSr\n"<<endl; cout<<"\t55\t56\n\tCs\tBa\n"<<endl; cout<<"\t87\t88\n\tFr\tRa\n"<<endl; cout<<"Enter the Atmic number of the element you want to know more about \n"; cin>>::n; } void open() { ifstream elements; char x[200]; switch(::n) case 1:elements.open("Hydrogen.txt"); while(elements) { elements.getline(x, 200, '\n'); cout>>x; } } void main() { clrscr(); disp(); open(); getch(); } #包括 #包括 #包括 #包括 int n; void disp() { cout_C++ - Fatal编程技术网

该程序没有';输出后不结束 我使用Turbo C++,我自己试着做一个程序。我有很多问题和很多错误,我浏览了整个网站,解决了除了这个问题以外的所有问题。程序运行并显示输出后,程序不会结束。Ctrl+Break也不起作用,我只能关闭它并再次运行。有人能帮我吗 #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> int n; void disp() { cout<<"\tPERIODIC TABLE OF THE s-BLOCK ELEMNTS\n"<<endl; cout<<"\t1\n\tH\n"<<endl; cout<<"\t3\t4\n\tLi\tBe\n"<<endl; cout<<"\t11\t12\n\tNa\tMg\n"<<endl; cout<<"\t19\t20\n\tK\tCa\n"<<endl; cout<<"\t37\t38\n\tRb\tSr\n"<<endl; cout<<"\t55\t56\n\tCs\tBa\n"<<endl; cout<<"\t87\t88\n\tFr\tRa\n"<<endl; cout<<"Enter the Atmic number of the element you want to know more about \n"; cin>>::n; } void open() { ifstream elements; char x[200]; switch(::n) case 1:elements.open("Hydrogen.txt"); while(elements) { elements.getline(x, 200, '\n'); cout>>x; } } void main() { clrscr(); disp(); open(); getch(); } #包括 #包括 #包括 #包括 int n; void disp() { cout

该程序没有';输出后不结束 我使用Turbo C++,我自己试着做一个程序。我有很多问题和很多错误,我浏览了整个网站,解决了除了这个问题以外的所有问题。程序运行并显示输出后,程序不会结束。Ctrl+Break也不起作用,我只能关闭它并再次运行。有人能帮我吗 #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> int n; void disp() { cout<<"\tPERIODIC TABLE OF THE s-BLOCK ELEMNTS\n"<<endl; cout<<"\t1\n\tH\n"<<endl; cout<<"\t3\t4\n\tLi\tBe\n"<<endl; cout<<"\t11\t12\n\tNa\tMg\n"<<endl; cout<<"\t19\t20\n\tK\tCa\n"<<endl; cout<<"\t37\t38\n\tRb\tSr\n"<<endl; cout<<"\t55\t56\n\tCs\tBa\n"<<endl; cout<<"\t87\t88\n\tFr\tRa\n"<<endl; cout<<"Enter the Atmic number of the element you want to know more about \n"; cin>>::n; } void open() { ifstream elements; char x[200]; switch(::n) case 1:elements.open("Hydrogen.txt"); while(elements) { elements.getline(x, 200, '\n'); cout>>x; } } void main() { clrscr(); disp(); open(); getch(); } #包括 #包括 #包括 #包括 int n; void disp() { cout,c++,C++,您使用的流运算符不正确。而不是>(用于cin)你的代码中没有一行表示“代码> cOUT cOUT/CODE >是输出流,你想读它。你是指我使用Turbo C++——为什么?编译器是25年前的,不是ANSI标准。请阅读并说明T的内容。有很多更好的和更现代的选项,比如G++、CLang或Visual C++的C++版本。

您使用的流运算符不正确。而不是
>
(用于cin)你的代码中没有一行表示“代码> cOUT <代码> cOUT/CODE >是输出流,你想读它。你是指<代码>我使用Turbo C++——为什么?编译器是25年前的,不是ANSI标准。请阅读并说明T的内容。有很多更好的和更现代的选项,比如G++、CLang或Visual C++的C++版本。