1、java中的写法
/*
* XConnectPlugin.java
*
* Created on: 2014年4月30日
* Author: [email protected]
*/
package org.cocos2dx.commonSDK;
import android.util.Log;
public class XConnectPlugin {
public static void start(String str) {
Log.d("mylog ", "str>>" + str);
}
}
2、C++中的写法
头文件(XInterface.h)声明方法:
/*
* XInterface.h
*
* Created on: 2014年4月30日
* Author: [email protected]
*/
#ifndef XINTERFACE_H_
#define XINTERFACE_H_
#include "string"
class XInterface {
public:
static void start(const char* ct);
};
#endif /* XINTERFACE_H_ */
XInterface.cpp中写法:
/*
* XInterface.cpp
*
* Created on: 2014年