I am a beginner with sockets in C and trying to develop my first application
this is a portion of the client code and it is giving me an error
the error is caused by the line indicated below.
int sockfd = 0;
char fromServer[MAXSIZE];
char * fromClient;
fromClient=(char*)malloc(MAXSIZE * sizeof(char));
struct sockaddr_in remoteServAddr;
sockfd = Socket(AF_INET,SOCK_DGRAM,0);
}
int n;
printf(">>");
scanf("%s",&fromClient); //the error is on this line
sendto(sockfd,fromClient,MAXSIZE,0,(SA*)remoteServAddr,sizeof(remoteServAddr));
UPDATE: the error is fixed thank you