// Win32Console.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "baseCplusplus1.h";
#include "baseClassRelInfo2.h";
#include "TestProgram.h"
#include "ProgramPerformance.h"
#include "ProgramPerformance2.h";
void baseCplusplusOp(); //C++函数模板递归一二维数组动态分配存储空间实例1
void baseClassRelInfo2(); //C++类的相关基础2
void baseClassRelInfo2_1(); //C++类的相关基础2 //操作符重载
void ComputeRoots(); //计算根公式
void findMax(); //寻找最大值
void ProgramPerformance(); //程序性能1
void ProgramPerformance2(); //程序性能2
int _tmain(int argc, _TCHAR* argv[])
{
baseCplusplusOp();
baseClassRelInfo2();
std::cout<<"/操作符重载"<<std::endl;
baseClassRelInfo2_1();
std::cout<<"计算根公式"<<std::endl;
ComputeRoots();
std::cout<<"寻找最大值"<<std::endl;
findMax();
std::cout<<"程序性能"<<std::endl;
ProgramPerformance();
std::cout<<"程序性能2"<<std::endl;
ProgramPerformance2();
//暂停操作
char str;
std::cin>>str;
//程序结束
return 0;
}
//程序性能2
void ProgramPerformance2()
{
int a[11]={1,5,2,6,9,11,18,20,25,7,30};
int n=11;
int x=7;
for(int i=0;i<n;i++) std::cout<<a[i]<<" ";
std::cout<<std::endl;
BubbleSort_intimestop(a,n); //排序
std::cout<<"折半搜索"<<std::endl;
int pos=BinarySearch(a,x,n);
std::cout<<x<<" pos="<<pos<<std::endl;
for(int i=0;i<n;i++) std::cout<<a[i]<<" ";
std::cout<<std::endl;
}
原文链接: https://www.cnblogs.com/sqlite3/archive/2010/07/16/2566928.html
欢迎关注
微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍
原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/12761
非原创文章文中已经注明原地址,如有侵权,联系删除
关注公众号【高性能架构探索】,第一时间获取最新文章
转载文章受原作者版权保护。转载请注明原作者出处!