Iostream and iostream. h
# Include Non-standard output stream
# Include Standard output stream
Take a short look at the simple code when android ndk is used in eclipse, hello. cpp
#include
#include
#include
#include
using namespace std;int main() {std::string s = "string";printf("printf\n");std::cout << "cout" << std::endl;return 0;}
In Application. mk, it is written in this way.
APP_ABI := armeabiAPP_STL := stlport_static
Fortunately, an error occurred,
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...
...
How can this problem be solved?
# Include -> # Include
APP_STL: = stlport_static-> APP_STL: = gnustl_static
". H" is non-standard, C's standard library functions, and there is no ". h". A namespace is required, which is C ++.
There are some differences, such as math.