struct가 충돌하는 것 같은데 어떻게 고쳐야 할지 모르겠습니다.
글쓴이: shdthwnd722 / 작성시간: 목, 2019/07/11 - 10:57오후
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define SERV_TCP_PORT 60000
#define SERV_ADDR "165.246.38.151"
void handle_state2(int x, fd_set * pset, char *buf, struct client *cli);
struct client
{
char name[20];
int state;
int partner;
};
void handle_state2(int x, fd_set * pset, char *buf, struct client *cli)
{
if(strcmp(buf, "") == 0)
{
printf_error(x, &pset);
}
cli[x]->name = buf;
write(x, "ready?\nyes/no", 5);
}
이렇게 하면
servping.c:131:6: error: conflicting types for ‘handle_state2
이런 에러가 뜨는데 struct가 문제인걸로 추측이되는데 정확히는 잘 모르겠습니다... 도와주세요
Forums:
이렇게 하면 되지 않을까요?
이렇게 하면 되지 않을까요?
뭐가 달라진거죠?
잘 모르겠는데요
void handle_state2(int x, fd
void handle_state2(int x, fd_set * pset, char *buf, struct client *cli);
struct client 가 나오는데 그게 위에 있어야 할 거에요.
void handle_state2 (int x, fd
댓글 달기