Showing posts with label c. Show all posts
Showing posts with label c. Show all posts

Thursday, October 04, 2012

Another way of adding NDK logs in C/C++:

#include
LOCAL_LDLIBS := -llog

void LOGI(char *szMsg)
{
__android_log_write(ANDROID_LOG_ERROR,"Tag",szMsg);
}
 Read and print all arguments in C/C++:
===========================
     
  int count;
   for (count = 0; count < argc; count++)
   {
            printf ("%s\n", argv[count]);
   }