Ejemplo n.º 1
0
MyStart::MyStart(QObject *parent) :
    QObject(parent)
{
    //to do .....
    int i;
    for (i=0; i<100; i++)
    {
        //to do somethings
    }
	
	BYTE byVar;
	byVar = byVar; //[email protected]
    
    while(1)
    {
        
        //ha ha ah aha .....
    }
	//modify on branch master
	
	//add by likangbao at 2014-5-21-22:12
	int x=10;
	int y=20;
	int result = add_fun(x,y);
	
}
Ejemplo n.º 2
0
int main(){
    // nameing
    // Microsoft
    {
        int m_xxx=10; // local
        int cntTemp; // local function
    }

    {
        int cFoo_; // C++ members
    }

    int a=10,b=100;
    operation_type oper = add;
    chose_operation(oper);
    printf("call operation %d ",call_operation(a,b));
    printf("call operation %d ",add_fun(a,b));

}
Ejemplo n.º 3
0
/* This is a trivial JNI example where we use a native method
 * to return a new VM String. See the corresponding Java source
 * file located at:
 *
 *   apps/samples/hello-jni/project/src/com/example/hellojni/HelloJni.java
 */
jstring
Java_com_example_hellojni_HelloJni_stringFromJNI(JNIEnv *env,
                                                 jobject thiz) {
#if defined(__arm__)
#if defined(__ARM_ARCH_7A__)
#if defined(__ARM_NEON__)
#if defined(__ARM_PCS_VFP)
#define ABI "armeabi-v7a/NEON (hard-float)"
#else
#define ABI "armeabi-v7a/NEON"
#endif
#else
#if defined(__ARM_PCS_VFP)
#define ABI "armeabi-v7a (hard-float)"
#else
#define ABI "armeabi-v7a"
#endif
#endif
#else
#define ABI "armeabi"
#endif
#elif defined(__i386__)
#define ABI "x86"
#elif defined(__x86_64__)
#define ABI "x86_64"
#elif defined(__mips64)  /* mips64el-* toolchain defines __mips__ too */
#define ABI "mips64"
#elif defined(__mips__)
#define ABI "mips"
#elif defined(__aarch64__)
#define ABI "arm64-v8a"
#else
#define ABI "unknown"
#endif
    int res = add_fun(1, 2);

    LOGD("res= %d", res);
    return (*env)->NewStringUTF(env, "Hello from JNI !  Compiled with ABI " ABI ".");
}
Ejemplo n.º 4
0
int main(void) {
	add_fun(1,2);
	return 0;
}