Реферат: Сортировка массивов методом вставок

argcGlobal=argc;

if (argc>1)//Åñëè çàäàí ïàðàìåòð, òî ïðèíÿòü åãî

strcpy(fname,argv[1]);//êàê íàçâàíèå äëÿ ôàéëà îò÷åòà.

else

strcpy(fname,"Log.txt");

if (argc>2)

strcpy(foname,argv[2]);//Âòîðîé àðãóìåíò - äëÿ ÷òåíèÿ.

f.open(fname);//Ñîçäàíèå è ïîäãîòîâêà ôàéëà ê çàïèñè.

do{//Âûïîëíÿòü ïîêà bool=0.

bool=menu();//Áàçîâàÿ ôóíêöèÿ ïðîãðàììû.

}while (bool==0);

f.close();//Çàêðûòèå ôàéëà è çàïèñü íà ÆÄ.

cout<<"\n\n\n\n\n\n\n\n\n\n";

cout<<"InsetSort. v 0.3 (C) 2003-2004 Created by Chaplygin Vasilij.";

cin.get();

cin.get();

return 0;

}

////////////////////MENU////////////////////

int menu(){

cout<<endl<<" Main Menu:"<<endl;

cout<<" 1. Make New List." <<endl;

cout<<" 2. Add Element." <<endl;

cout<<" 3. Print List." <<endl;

cout<<" 4. Delete Element."<<endl;

cout<<" 5. Save List." <<endl;

cout<<" 6. Erase List." <<endl;

cout<<" 7. Open File." <<endl;

cout<<" 8. Find Element." <<endl;

К-во Просмотров: 475
Бесплатно скачать Реферат: Сортировка массивов методом вставок