본문 바로가기

코딩/해결

[분산시스템] [UDP 소켓 프로그래밍] server.c

server.c:51:47: error: ‘type’ undeclared (first use in this function)
   51 |                 if (RecvMsg.type == READ_REQ) type = READ_REP;
      |                                               ^~~~
server.c:51:47: note: each undeclared identifier is reported only once for each function it appears in
server.c:52:31: error: assignment to expression with array type
   52 |                 RecvMsg.value = "DDDCCCCBBBBAAAA";
      |                               ^
make: *** [Makefile:13: server.o] Error 1

 

 

if (RecvMsg.type == READ_REQ) RecvMsg.type = READ_REP;

 

strcpy(RecvMsg.value, "DDDCCCCBBBBAAAA");