我在 Eclipse 中有一个 Android 项目。在jni我创建的文件夹Store.h中,我刚刚定义:
class Store{
};
在Store.c我输入:
#include "Store.h"
而且我在定义中遇到错误,class Store但是如果我使用Store.hppandStore.cpp文件而不是.h并且.c我没有收到任何错误。谁能解释为什么?在这种情况下使用哪种格式更好,为什么?
我在 Eclipse 中有一个 Android 项目。在jni我创建的文件夹Store.h中,我刚刚定义:
class Store{
};
在Store.c我输入:
#include "Store.h"
而且我在定义中遇到错误,class Store但是如果我使用Store.hppandStore.cpp文件而不是.h并且.c我没有收到任何错误。谁能解释为什么?在这种情况下使用哪种格式更好,为什么?