zoukankan      html  css  js  c++  java
  • 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
    ");
    
    	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。

    版权声明:本文博主原创文章。博客,未经同意不得转载。

  • 相关阅读:
    OC准备知识
    文件操作
    双向链表
    单链表(Single Linked List)
    动态分配内存补充 realloc
    git心得一
    git的工作原理
    git:团队开发的流程
    git操作流程
    js:有关属性
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/4826738.html
Copyright © 2011-2022 走看看