zoukankan      html  css  js  c++  java
  • hello.cpp 第一个C++程序(本博客没有特指都是以QT测试)

    操作步骤:
    1.文件->新建文件或项目(N)->New File or Project->Qt Console Application->Choose->“名称”中输入工程名称->“创建路径”中输入保存位置->下一步->选择“工具包”->下一步->完成。

    1.新标准

    1 #include <iostream>
    2 int main(int argc, char *argv[])
    3 {
    4     std::cout << "hello world
    ";
    5     return 0;
    6 }

    2.旧的标准(发现QT不支持)

    1 #include <iostream.h>  // 必须使用.h
    2 int main(int argc, char *argv[])
    3 {
    4     cout << "hello world
    ";  // 不再使用std::
    5     return 0;
    6 }

    3.增加输入

    1 #include <iostream>
    2 int main(int argc, char *argv[])
    3 {
    4     char response;
    5     std::cin >> response;
    6     std::cout << "hello world
    ";
    7     return 0;
    8 }
  • 相关阅读:
    Jenkins持续集成
    爬豆瓣保存到sqlite3
    爬豆瓣保存到Excel
    sqlite3数据库的增删查改
    用pandas和matplotlib对用户消费行为分析
    TCP请求
    fastjson
    断言
    将结果写入文件
    加解密
  • 原文地址:https://www.cnblogs.com/FKdelphi/p/10273519.html
Copyright © 2011-2022 走看看