+ 2

How to save a c++ program

27th Nov 2017, 1:30 PM
Ponibai Choudhary
Ponibai Choudhary - avatar
4 Answers
+ 9
In your computer? 1.Open Notepad++ 2.Write C++ program 3.Save As. (Extension:.cpp)
27th Nov 2017, 1:31 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 4
if you are using codeblocks for example, Go to File > New, Type your program, Click Save , then Save As, Give it a name then ".cpp" extension e.g. helloWorld.cpp then press enter.
27th Nov 2017, 4:23 PM
MÎDÅƞ
MÎDÅƞ - avatar
+ 2
Save it as Filename.cpp
27th Nov 2017, 2:13 PM
Faisal Rahman
Faisal Rahman - avatar
0
case 4:{ string sname; cout<<"update by name: ";cin>>sname; for(i=0;i<n;i++){ if(sname==obj[i].getName()){ obj[i].input(); cout<<"success!"<<endl; }else{ cout<<"not success!"<<endl; } } }break; default: cout<<"not options: "<<op<<endl; cout<<"please chose option again \n"<<endl; break; case 5:{ string sname; cout<<"delete by name: ";cin>>sname; for(i=0;i<n;i++){ if(sname==obj[i].getName()){ for(j=i;j<n;j++){ obj[j]=obj[j+1]; } n--; cout<<"remove success!"<<endl; } } }break; default: cout<<"not options: "<<op<<endl; cout<<"please chose option again \n"<<endl; break; case 6:{ string insert; cout<<"insert by name: ";cin>>sname; for(i=0;i<n;i++){ if(insert==obj[i].getName()){ for(j=n;j>i;j--){ obj[j]=obj[j-1]; } n++; obj[i].input(); cout<<"insert success!"<<endl; break; } } }break; default: cout<<"not options: "<<op<<endl; cout<<"please chose option again \n"<<endl; break; }getch(); }while(op!=0); return 0;
17th Sep 2024, 2:52 PM
007 Reaksmey
007 Reaksmey - avatar