错误代码:

#include"iostream.h"
int main(void)
{int ilnput;cout<<"please input a number:"<<endl;cin>>ilnput;cout<<"the number is:"<<ilnput<<endl;
}

报错:[Error] iostream.h: No such file or directory

正确代码:

#include<iostream>
using namespace std;
int main(void)
{int ilnput;cout<<"please input a number:"<<endl;cin>>ilnput;cout<<"the number is:"<<ilnput<<endl;
}

需要添加命名空间,否则会报错:

[Error] 'cout' was not declared in this scope; did you mean 'std::cout'?

[Error] iostream.h: No such file or directory解决办法相关推荐

  1. [Error] iostream.h: No such file or directory的解决办法

    直接上错误代码实例 #include <iostream.h>int main() {print('hello, world\n')return 0;} 编译通不过,直接出错 [Error ...

  2. fatal error: Python.h: No such file or directory 解决

    [常见错误] fatal error: Python.h: No such file or directory 环境场景 系统: Parrot Linux 软件: 系统python默认版本2.7 Py ...

  3. 关于THC/THC.h: No such file or directory解决办法

    最近在跑FCOS代码时,在最后一步总是出现 fatal error: THC/THC.h: No such file or directory 百度,谷歌全找了一遍,最后发现时pytorch在最新的版 ...

  4. GL/gl.h: No such file or directory 解决办法

    /home/xxxx/Qt5.6.0/5.6/gcc_64/include/QtGui/qopengl.h:120: error: GL/gl.h: No such file or directory ...

  5. “d3dx9.h”: No such file or directory 解决办法

    今天用vc6.0试学DirectX知识,于是在官网下载最新的DirectX  SDK,然后解压之后,就开始调用sdk库,结果一编译就出现d3dx9.h找不到:[无法打开包括文件:"d3dx9 ...

  6. Cannot open include file: jni.h: No such file or directory解决方法

    在此运行Visual Studio 2012 项目时出现 #include <stdio.h> #include <jni.h> int main() { printf(&qu ...

  7. 【linux】error: stdio.h: No such file or directory

    ubuntu 默认没有C和C++编译环境 ubuntu 默认没有C和C++编译环境,新装的ubuntu,使用gcc编译时,会报错,找不到某某头文件等.在编译一个demo,如hello world时,会 ...

  8. Install matplotlib Error: src/ft2font.h:16:22: fatal error: ft2build.h: No such file or directory

    在ubuntu下从源码安装matplotlib的时候出现这样的错误: src/ft2font.h:16:22: fatal error: ft2build.h: No such file or dir ...

  9. 【错误记录】编译 ijkplayer 报错 (fatal error: libyuv.h: No such file or directory #include “libyuv.h“ )

    文章目录 一.报错信息 二.解决方案 参考 https://github.com/bilibili/ijkplayer 项目的编译过程 ; 一.报错信息 在编译完 ffmpeg 之后 , 执行 ./c ...

最新文章

  1. [转]几句不可不看的经典人生语句
  2. Just another board game 博弈-vector套vector
  3. linux查找文件find
  4. freemarker 概述
  5. 你应该知道Linux内核softirq
  6. TensorFlow:曼德布洛特(Mandelbrot)集合
  7. VBA中让程序休眠 SLeep的方法
  8. adalm pluto_将Apache Pluto与Lucene搜索引擎示例教程集成
  9. Linux入门的基础知识点
  10. oracle脱敏脚本
  11. Visio Professional 2019 激活方法详解
  12. 下采样downsample和decimate
  13. deepin配置ssh访问
  14. 2022年营收增长高达70%,智云健康“医院为先”战略成效持续凸显
  15. 【软考-软件设计师精华知识点笔记】第十章 网络与信息安全
  16. 简析打开激光测距突破口的超远TFN LR20KI激光测距仪
  17. Simulink 模型导出FMU
  18. 基于JavaSDK调用FISCO BCOS 区块链
  19. Android应用开发中,第三方集成新浪微博(sinaWeiboSDK)的过程记录
  20. 【雕刻机】Grbl程序使用入门

热门文章

  1. 如何彻底删除node.js以及node.js安装教程(基于Centos其他linux版本可以类推 )
  2. DecimalFormat的几种用法!
  3. 041 柯西中值定理证明及型三(ξ与a,b可分离)
  4. 计算机毕业设计springboot+vue基本微信小程序的水库巡检系统
  5. 认知升级篇:别说你懂《刻意练习》
  6. office 2010 快捷键
  7. 记录一次基于PyQt5的标准铂电阻温度计分度表制作界面设计
  8. 将Simulink中的数据更新到GUI中(记录)
  9. 基于springboot物业管理系统毕设
  10. 【Matlab语音加密】语音信号加密解密(带面板)【含GUI源码 181期】