std是一个类(输入输出标准),它包括了cin成员和cout成员,using name space std ;以后才能使用它的成员。#include<iostream.h>中不存在类std,但是他又cin,out的相关函数,不需要使用命名空间了。而第二种标准#include<iostream>,它包含了一个类,在类的使用之前要预处理一下,using namespace std;就是这个功能,然后你就可以使用cin,cout这两个成员函数了,假设你不使用预处理(using namespace std;),麻烦加上std::cin或者std::cout再去使用它的成员函数(头文件中存在这个类)

C++ 中std::的使用的更多相关文章

  1. C++ 中std::function 、std::bind的使用和lambda的使用

    std::function是可调用对象的包装器:std::bind是将可点用对象和其参数一起进行绑定,且绑定后的结果可以使用std::function对象进行保存,并延迟调用到需要调用的时候: 在C+ ...

  2. C++11中std::forward的使用 (转)

    std::forward argument: Returns an rvalue reference to arg if arg is not an lvalue reference; If arg ...

  3. C++11中std::unordered_map的使用

    unordered map is an associative container that contains key-value pairs with unique keys. Search, in ...

  4. C++中std::fill/std::fill_n的使用

    There is a critical difference between std::fill and memset that is very important to understand. st ...

  5. C++11中std::bind的使用

    std::bind: Each argument may either be bound to a value or be a placeholder: (1).If bound to a value ...

  6. C++11中std::forward的使用

    std::forward argument: Returns an rvalue reference to arg if arg is not an lvalue reference; If arg ...

  7. C++11中std::function的使用

    class template std::function is a general-purpose polymorphic function wrapper. Instances of std::fu ...

  8. C++11中std::move的使用

    std::move is used to indicate that an object t may be "moved from", i.e. allowing the effi ...

  9. c++中std::set自定义去重和排序函数

    c++中的std::set,是基于红黑树的平衡二叉树的数据结构实现的一种容器,因为其中所包含的元素的值是唯一的,因此主要用于去重和排序.这篇文章的目的在于探讨和分享如何正确使用std::set实现去重 ...

随机推荐

  1. Nginx常用命令之启动与重启

    1.测试新的Nginx程序是否正确 [test@P-SH-Nginx-01 nginx]$ ./sbin/nginx -t nginx: the configuration file /usr/loc ...

  2. Arm32进行远程调试

    Arm 32bit Goland 远程调试 32位支持issue Goland配置Go remote支持文档 https://mojotv.cn/go/golang-remote_debug Delv ...

  3. UE4.25 Slate源码解读

    概述 Slate系统是UE的一套UI解决方案,UMG系统也是依赖Slate系统实现的. 问题: Slate系统是如何组织的? 控件树的父子关系是如何绑定的? Slate系统是如何渲染的? slate渲 ...

  4. 1000-ms-maven相关问题

    一.Maven有哪些优点和缺点 优点如下: 简化了项目依赖管理: 易于上手,对于新手可能一个"mvn clean package"命令就可能满足他的工作 便于与持续集成工具(jen ...

  5. linux history命令优化

    主要功能: 1, 可以记录哪个ip和时间(精确到秒)以及哪个用户,作了哪些命令 2,最大日志记录增加到4096条 把下面的代码直接粘贴到/etc/profile后面就可以了 #history modi ...

  6. React报错之No duplicate props allowed

    正文从这开始~ 总览 当我们为相同的组件传递相同的属性多次时,就会导致"No duplicate props allowed"警告.为了解决该警告,请确保只传递一次该属性.比如说, ...

  7. pat链表专题训练+搜索专题

    本期题目包括: 1074:https://pintia.cn/problem-sets/994805342720868352/problems/994805394512134144 1052:http ...

  8. vue2与vue3实现响应式的原理区别和提升

    区别: vue2.x: 实现原理: 对象类型:Object.defineProperty()对属性的读取,修改进行拦截(数据劫持): 数组类型:通过重写更新数组的一系列方法来进行拦截(对数组的变更方法 ...

  9. DS二叉树——二叉树之数组存储

    题目描述 二叉树可以采用数组的方法进行存储,把数组中的数据依次自上而下,自左至右存储到二叉树结点中,一般二叉树与完全二叉树对比,比完全二叉树缺少的结点就在数组中用0来表示.,如下图所示 从上图可以看出 ...

  10. java中使用 POI导出excel表格的简单实现

    大概流程分7步: 1.创建工作簿 --> 2.创建sheet表 --> 3.创建row行(建议使用循环) --> 4.用row行逐一创建单元格(建议使用循环) --> 5.单元 ...