请C语言高手帮我看看这程序有没有错误,谢谢。

来源:百度知道 编辑:UC知道 时间:2024/05/10 15:00:01
#include<ctype.h>
#include<math.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#define NUMBER 20
#define Esc 0x1b
#define Enter 0x0d
float A[NUMBER][NUMBER+1],ark;
int flag,n;
void Polybasic_equation_operation();
exchange(int r,int k);
float max(int k);
message();

int menu_select(void);
void main(void)
{
clrscr();

for(;;)
{
switch(menu_select())
{
case 0:Polybasic_equation_operation();break;
/*case 1:Matrix_series_operation();break;*/
/*case 2:*/
case 3:exit(0);break;
}

}
}
int menu_select()
{
int s;
char a[80];
gotoxy(1,25);/*将光标定为在第25行,第1列*/
printf("press any key enter menu......\n");/*提示压任意键继续*/
getch(); /*读入任意字符*/
clrscr(); /*清屏*/

我想你是用VC++6.0编绎的,在VC++6.0里面执行不了,有如下原因:
Polybasic_equation_operation();只声明没有定义,
clrscr()与gotoxy等是dos的方法,vc肯定不可能有,windows下就应该使用windows提供的功能:
VC 中就不要用这个 gotoxy 了 ... 我查了一下,还没找到在VC++里面可以实现这个功能的,你可以再查找一下,
当然,在TC中可能正确,就是说,对于C语言来说,可能没有错误,只是VC++编译器通过不了这个C语言代码!欢迎加编程与电脑Q群 21875766共同学习研究学习过程中遇到的问题,以下是我改过的代码:
#include <ctype.h>
#include<math.h>
#include<conio.h>
#include<string.h>
#include <stdlib.h>

#include<stdio.h>
#define NUMBER 20
#define Esc 0x1b
#define Enter 0x0d
extern void gotoxy(int x, int y);
float A[NUMBER][NUMBER+1],ark;
int flag,n;
void Polybasic_equation_operation();
exchange(int r,int k);

message();

menu_select();
clrscr();
// gotoxy(int x, int y);
atoi();

int main(void)
{
//clrscr();

for(;;)
{
switch(menu_select())
{
case 0:Po