-5
나는 구조로 약간의 코딩을 해왔고 아무도 해결할 수없는 일관된 오류가 발생했습니다.재정의; 다른 기본 유형
나는이 오류가 발생합니다. 주로 1 줄입니다. 이 구조
typedef struct register_
{
int cyear;// current year
int age, id, register_date, tele[15];
char choice[3], name[20], email[20], category[10];
char unique[20]; //password enter
}regis;
에 대한
1>c:\users\kevin\documents\visual studio 2010\projects\is the complier trying to piss me off\is the complier trying to piss me off\lets find out.cpp(91): error C2371: 'regis' : redefinition; different basic types
1> c:\users\kevin\documents\visual studio 2010\projects\is the complier trying to piss me off\is the complier trying to piss me off\lets find out.cpp(10) : see declaration of 'regis'
이것은이
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <conio.h>
void screen();
char desion(char, char);
char reg,log;
int worker_menu(char signup(struct regis));
int customer_menu(char signup(struct regis));
void in(struct enter);
char signup(struct regis);
void category(struct regis);
int time(struct register_ regis);
char add(struct movie, struct regis);
char change(struct add, struct regis, struct movie);
char today_list(struct list, struct regis, struct movie, struct add, int, int);
char bought(struct list);
void finish(struct buy, struct ticket);
int size;
float *price;
int *id,*duration;
char *unique,*code,*status,*type,*director,*ratings,*date,*title;
int rand(void);
int choice;
void main()
{
screen();
char signup(struct regis);
char desion(char, char);
while (choice !=0)
{
switch(choice)
{
case 1:
void in(struct login enter);
break;
case 2:
char signup(struct regis, struct born);
break;
case 3:
char add(struct movie, struct regis);
break;
case 4:
char change(struct add, struct regis, struct movie);
break;
case 5:
char today_list(struct list, struct regis, struct movie, struct add, int, int);
break;
case 6:
char bought(struct list);
break;
case 0:
printf("ending program\n");
default:
printf("invalid option\n");
break;
}
void screen();
}
return;
getche();
}
내가 잘못하고있는 무슨 단서가 없다가 포함되어 있습니다. 누구나 할 수 있습니다.
C++에 코드 스 니펫을 사용하지 마십시오. 웹 기술에만 해당됩니다. 감사. –
이것은 C와 비슷한 스타일로 C++처럼 보이지 않습니다. 이 예가 책이나 웹 사이트에서 나온 것이라면, 배울 수있는 최신 자료를 찾아야합니다. – NicholasM
당신은'main' 안에 많은 함수를 선언하고 있습니다 만, 당신은 이미 리턴 한 후에 그 중 하나만 호출 할 것입니다. 좋은 책의 기능에 관한 장을 다시 읽어야합니다. 그리고 컴파일하기 전에 많은 코드를 작성하면 안됩니다. – molbdnilo