C++ 求助 c(12): error C2059: syntax error : 'string'

炼狱求生 2014-03-29 09:13:06
#include <ntddk.h>

#ifdef _cplusplus
extern "C"
{
#endif
#include "ntddk.h"
#ifdef __cplusplus
}
#endif

extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject,PUNICODE_STRING pUnicoderString)

{
KdPrint(("驱动加载成功"));
return 0;
}

d:\qudong\event\event.c(12): error C2059: syntax error : 'string'
请问这是为什么难受了一下午抄都都这样错为什么
...全文
307 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
炼狱求生 2014-03-29
  • 打赏
  • 举报
回复
KdPrint("111"); 错误依旧
bobo928843007 2014-03-29
  • 打赏
  • 举报
回复
我也不懂你在做什么,看是语法错误,我就看看了
bobo928843007 2014-03-29
  • 打赏
  • 举报
回复

KdPrint(("驱动加载成功"));//为什么是这样写呢("驱动加载成功"),"(驱动加载成功)"这样写行吗
炼狱求生 2014-03-29
  • 打赏
  • 举报
回复
#include <ntddk.h> #include <string.h> #ifdef _cplusplus extern "C" { #endif #include "ntddk.h" #ifdef __cplusplus } #endif extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject,PUNICODE_STRING pUnicoderString) { KdPrint(("驱动加载成功")); return 0; } 就这么一点才开始学驱动程序
bobo928843007 2014-03-29
  • 打赏
  • 举报
回复
引用 2 楼 u012399946 的回复:
加上 #include<string.h> 也没用
有代码吗,可以贴出来吗
炼狱求生 2014-03-29
  • 打赏
  • 举报
回复
加上 #include<string.h> 也没用
bobo928843007 2014-03-29
  • 打赏
  • 举报
回复
event.c,语法错误,不贴出来怎么看,你有没有#include<string.h>

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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