qq_43412960 2019-12-21 10:23 采纳率: 78.6%
浏览 163
已采纳

这是一个关于数据结构链表的相关问题


#include<iostream>
#include<conio.h>
#include<string.h>
#define OK 1
#define MAXSIZE 100
using namespace std;
typedef  int Status;

typedef  struct  
{
char name[5];
float price;    
}Book;
typedef Book ElemType;

typedef  struct LNode
{
ElemType data;
struct LNode *next;


}LNode,*LinkList;
Status InitList(LNode *L)
{
L=new LNode;
if(!L)
exit(-1);
else

return OK;
}

int main()
{










getch();


return 0;
}

这是我写的全部代码
报错如下
--------------------Configuration: 线性表 - Win32 Debug--------------------
Compiling...
线性表.cpp
E:\数据结构\线性表.cpp(27) : error C2018: unknown character '0xa3'
E:\数据结构\线性表.cpp(27) : error C2018: unknown character '0xa9'
E:\数据结构\线性表.cpp(28) : error C2146: syntax error : missing ')' before identifier 'exit'
Error executing cl.exe.

线性表.exe - 3 error(s), 0 warning(s)
为什么呢?

  • 写回答

1条回答

  • threenewbee 2019-12-21 10:48
    关注

    if(!L)
    后面的括号是中文全角的。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题