#include <iostream.h> non-standard output streams
#include <iostream> standard output stream
Take a look at the simple code that comes with the Android ndk on Eclipse, hello.cpp
#include <jni.h> #include <iostream.h> #include <string.h> #include <stdio.h>using namespace Std;int Main () {std::string s = "string";p rintf ("printf\n"), Std::cout << "cout" << Std::endl;return 0;}
In Application.mk, it's written like this.
App_abi: = Armeabiapp_stl: = stlport_static
Fortunately, there was a mistake,
Postypes.h:230:16:error: ' mbstate_t ' is not declared in this scope ...
...
Ios:5:7:error: ' _stlp_new_io_namespace ' have not been declared ...
...
How do we solve it now?
#include <iostream.h> #include <iostream>
App_stl: = stlport_static, App_stl: = gnustl_static
". h" non-standard, C standard library functions, none ". h", need to use a namespace, is C + +.
There are some not exactly the differences, like math.