note: expected ‘char’ but argument is of type ‘ch怎么回事呢

lgmsyy 2014-03-17 02:16:47
char *lgm="i love china!";//我想以字符串作为传输传递给testInit函数,提示我错误
imghandle = testInitTHFaceID(lgm,frMode);

----------------
函数如下
int testInit(char *Path,int mode){
printf("%s\n",Path);
return 1;
}
-------------
note: expected ‘char’ but argument is of type ‘ch
我应该怎么更改呢。
...全文
4327 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2014-03-17
  • 打赏
  • 举报
回复
char *lgm="i love china!"; 改为 char lgm[30]="i love china!"; 再试试?
lgmsyy 2014-03-17
  • 打赏
  • 举报
回复
引用 4 楼 zhao4zhong1 的回复:
C怎么用Java VM运行?
因为我用到JNI
赵4老师 2014-03-17
  • 打赏
  • 举报
回复
C怎么用Java VM运行?
lgmsyy 2014-03-17
  • 打赏
  • 举报
回复
引用 楼主 lgmsyy 的回复:
char *lgm="i love china!";//我想以字符串作为传输传递给testInit函数,提示我错误 imghandle = testInitTHFaceID(lgm,frMode); ---------------- 函数如下 int testInit(char *Path,int mode){ printf("%s\n",Path); return 1; } ------------- note: expected ‘char’ but argument is of type ‘ch 我应该怎么更改呢。
刚才说错了,加上也不行,编译没问题,执行的时候通过不了 报错如下: # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb76de821, pid=8129, tid=3076957888 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_22-b03 mixed mode, sharing) # Problematic frame: # C [libc.so.6+0x73821] # # An error report file with more information is saved as hs_err_pid8129.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # 已放弃
lgmsyy 2014-03-17
  • 打赏
  • 举报
回复
引用 1 楼 zhao4zhong1 的回复:
int testInit(const char *Path,int mode){ ?
const去掉也不行啊
赵4老师 2014-03-17
  • 打赏
  • 举报
回复
int testInit(const char *Path,int mode){ ?

70,024

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧