以下这个程序哪里出错了?

来源:百度知道 编辑:UC知道 时间:2024/05/02 06:56:14
#include "conio.h"
#include "stdio.h"
#include "stdlib.h"
struct jincheng_type
{ int pid;
int youxian;
int daxiao;……… };
struct jincheng_type neicun[20];
int shumu=0,pid_l;
main()
{
int n,m,i;
char a;
n=1;
while(n==1)
{
clrscr();
printf("\n********************************************");
printf("\n* 进程演示系统 *");
printf("\n********************************************");
printf("\n 1.创建新的进程 2.查看运行进程 ");
printf("\n 3.换出某个进程 4.杀死运行进程 ");
printf("\n 5.进程之间通信 6.退出系统 ");
printf("\n********************************************");
printf("\n请选择(1~6)");
a=getche();
switch(a)
{ case'1':

int shumu=0,pid_l;
这句错了,在C语言中,定一变量时,不能把付值的变量放在没付值的变量之前,你试一下,把这两个变量颠倒一下,在编译一下试试

这个程序我写过,用C++写的,如果你需要,我可以发给你.

在第一句加入
#include "stdafx.h"