iostream与iostream.h乱弹琴
#include <iostream.h> 非标准输出流
#include <iostream> 标准输出流
见短eclipse关于使用android ndk时的简单代码。hello.cpp
#include <jni.h>
#include <iostream.h>
#include <string.h>
#include <stdio.h> using namespace std; int main() { std::string s = "string"; printf("printf\n"); std::cout << "cout" << std::endl; return 0;
}
Application.mk中,是这么写的
APP_ABI := armeabi
APP_STL := stlport_static
非常幸运的出现了一下错误。
postypes.h:230:16: error: 'mbstate_t' was not declared in this scope ...
...
ios:5:7: error: '_STLP_NEW_IO_NAMESPACE' has not been declared...
...
如今该怎么解决呢?
#include <iostream.h> -> #include <iostream>
APP_STL := stlport_static -> APP_STL := gnustl_static
“.h”非标准的。C的标准库函数,无".h"的,须要用命名空间,是C++的。
其他人是不是在所有的差异,实例math。
版权声明:本文博主原创文章。博客,未经同意不得转载。
iostream与iostream.h乱弹琴的更多相关文章
- 命名空间 <iostream>和<iostream.h> 由程序设计者命名的内存区域
namespace_百度百科 https://baike.baidu.com/item/namespace/1700121?fromtitle=命名空间 namespace即“命名空间”,也称“名称空 ...
- iostream与iostream.h的区别
简单来说: .h的是标准C的头文件,没有.h的是标准C++的头文件,两种都是头文件. 造成这两种形式不同的原因,是C++的发展历史决定的,刚才正好有别的人也问这个问题,这里我再回答一下(注意vs200 ...
- <iostream> 和 <iostream.h>的区别 及 Linux下编译iostream.h的方法
0.序言 其实2者主要的区别就是iostream是C++标准的输入输出流头文件,而iostream.h是非标准的头文件. 标准头文件iostream中的函数属于标准命令空间,而iostream.h中的 ...
- include<stdio.h> 和include<iostream.h>的区别
stdio 是C标准库里面的函数库 对应的基本都是标准输入输出等等C语言常用库的定义iostream是C++标准库的头定义, 对应的基本上是C++的输入输出相关库定义开发C程序用Stdio, C++用 ...
- #include<iostream.h>与#include<iostream> using namespace std的区别
所谓namespace,是指标识符的各种可见范围.C++标准程序库中的所有标识符都被定义于一个名为std的namespace中. 一 :<iostream>和<iostream.h ...
- #include<iostream>与#include<iostream.h>的区别
转载于祝长洋的BLOG:http://blog.sina.com.cn/s/blog_514b5f600100ayks.h ...
- #include <iostream>与#include <iostream.h>的区别
在新的C++标准中,生成新头文件的方法仅仅是将现有C++头文件名中的 .h 去掉.例如,<iostream.h> 变成了<iostream> ,<complex. ...
- #include<iostream>与#include<iostream.h>以及#inclue<string> 和 #include<string.h>的区别
转载于:http://www.cnblogs.com/charley_yang/archive/2010/12/08/1900715.html 1.从功能性的角度来讲,<iostream> ...
- iostream,iostream.h差异
1. 不加.h的是现在C++中规定的标准,目的在于使C++代码用于移植和混合嵌入时不受扩展名.h的限制, 避免因为.h而造成的额外的处理和修改而加.h的是c语言的用法,但是在c++中也支持这种用法, ...
随机推荐
- poj Budget
Budget 建图好题.不知道为什么提交一直TLE. 然后.该了几次,看了别人的普通网络流都过了. 我觉得可能是卡DINIC的某些部分吧.这题就是一道普通的上下界最小流. 建图麻烦,所以说一下建图吧. ...
- CSS计数器妙用
做web的经常会遇到类似排行榜的需求, 特别是要求前n名的样式和后面人不一样. 通常大多数人对于这个需求的做法都是在后端处理好排名名次, 在前端填入内容, 然后针对前n名做特殊的样式处理. 但是这样有 ...
- java中取得上下文路径的方法
1.request.getContextPath(); 获得web根的上下文环境 如 /tree tree是web项目的root context 2.可以在servlet的init方法里 String ...
- 21天教你学会C++
- hdu 4472 Count (递推)
Count Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Subm ...
- 使用Xamarin在Visual Studio中开发Android应用
原文:使用Xamarin在Visual Studio中开发Android应用 本文使用的环境是Windows 8 Visual Studio 2012.2 1.下载Xamarin http://xam ...
- Windows Phone开发(25):启动器与选择器之WebBrowserTask
原文:Windows Phone开发(25):启动器与选择器之WebBrowserTask 从名字上就看出来,这个家伙就是打开浏览并浏览到指定页面. 它有两个用途完全一样的属性:Uri属性是Syste ...
- C++ - Identifier not found
This is because forward declaration in C++: Compiler needs to know function prototype when functi ...
- LeetCode 53 Spiral Matrix
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral or ...
- lua 远程调试 【zeroBrane 使用mobdebug】(good转)
最近基于业务需求,学习了如何使用zeroBrane这个IDE实现C/S 模式下的 lua远程调试,废话不多,上效果图: ---------------------------------------- ...