I'm newbie. Pointer make my crazy T_T. Now, I'm do the socket programming project. This is my code.
typedef struct {
char *ip[INET6_ADDRSTRLEN];
char *username[20];
time_t login_time;
enum client_state client_state;
int no_login;
} Client;
Client client[max_connections] = {}; // set to null
char remoteIP[INET6_ADDRSTRLEN];
.
.
.
.
.
if(client[new_fd-4] == NULL) { // if fist attempt, client always null
// I want to setting client[new_fd-4].ip = &remoteIP
// How to write the code ??
}