C++编译错误

来源:百度知道 编辑:UC知道 时间:2024/05/24 13:05:30
我的程序在编译的时候出现了如下的错误,不知道是怎么回事,请你们帮帮忙
错误:
--------------------Configuration: ww - Win32 Debug--------------------
Linking...
1.obj : error LNK2001: unresolved external symbol "void __cdecl delet_xuehao(void)" (?delet_xuehao@@YAXXZ)
Debug/ww.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

ww.exe - 1 error(s), 0 warning(s)

程序段
#include<stdio.h>
#include<conio.h>
#define N 3
#define ESC 0x1b
typedef struct student
{
student()
{
sum=0.0;
}
char *name;
int xuehao;
float cj[N],ave,sum;
struct student *next;
}student,*stulist;

typedef struct paixu
{
paixu()
{
ave=65535.0;
}
float ave;
struct paixu *next;
struct paixu *prior;
}*plist;

void delet_xuhao()
{
int xuehao;
stulist q;
printf("请输入学号:");
scanf("%d&

你的程序不完整,不过也没有找到什么错误
一个:
void delet_xuhao()
{
int xuehao;
stulist q;
printf("请输入学号:");
scanf("%d",xuehao); //少了一个&:scanf("%d",&xuehao);
while(q->next!=NULL || q->next->xuehao!=xuehao) //这里没有错,楼上仔细看看
q=q->next;
if(q->next=NULL)
{
printf("没有找到相关记录不能删除......\n\n按任意键继续......");
}
else
{
delet_list(q);
printf("已删除......\n\n按任意键继续......");
}
getch();
}

没有主函数。帮你改过来了。自己看看了。
#include<stdio.h>
#include<conio.h>
#define N 3
#define ESC 0x1b
typedef struct student
{
student()
{
sum=0.0;
}
char *name;
int xuehao;
float cj[N],ave,sum;
struct student *next;
}student,*stulist;

typedef struct paixu
{
paixu()
{
ave=65535.0;
}
float ave;