网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  C++之hello world

C++之hello world

分类: IT文章 • 2025-01-11 11:32:13

#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{
cout << "hello world" <<endl;
cin.get();      
return 0;
}

计算程序执行时间

#include <iostream>
#include <time.h>

clock_t start_time    = clock();

    for (int i = 0; i < 10000; i++)
    {
        printf("%s","hello world");
    }
    
    clock_t end_time    = clock();

    std::cout<<"excuting time is :"<<static_cast<double>(end_time - start_time)/CLOCKS_PER_SEC * 1000<<"ms"<<std::endl;

相关推荐

  • 算法 代码规范(C++)&《数学之美》读后感
  • Hello This Cruel World!
  • Hello world可能遇到的问题 Hello world
  • Go! new Hello World, 我的第一个Go程序
  • Spring Boot实践教程(一):Hello,world!
  • Go 时间 Golang之时间、日期类型 Golang之时间格式化,计时器 Golang之hello,beego Golang之发送消息至kafka 安装kafka kafka链接zookeeper golang写入kafka Golang之beego读取配置信息,输出log模块 1,准备好配置文件 2,beego输出log文件日志 Golang之waitgroup用法 Golang之go 命令用法
  • 第二章 构造和运行模块 一、Hello World模块 二、模块编译和装载
  • C#学习(一)之hello,world
  • C++特殊工具与技术之RTTI
  • Quartz的Hello world
  • haproxy学习
  • Opencv step by step
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号