I give Up

and you R my last chance to not kill my self
I am new at socket programming and it should named stupit
because i search and search and what i found just coding and coding and coding

but the question where
where
where
where
to put that code

i have run the fedora and open a terminal
and try to put any code
that fedora run from virtual machine
but no result
what to do

i am trying to make a client/server code
Code:
#include <stdio.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h>#define SERVER_PORT 5432#define MAX_LINE 256intmain(int argc, char * argv[]){FILE *fp;struct hostent *hp;struct sockaddr_in sin;char *host;char buf[MAX_LINE];int s;int len;if (argc==2) {host = argv[1];}else {fprintf(stderr, "usage: simplex-talk host\n");exit(1);}/* translate host name into peer’s IP address */hp = gethostbyname(host);if (!hp) {fprintf(stderr, "simplex-talk: unknown host: %s\n", host);
exit(1);
}/* build address data structure */bzero((char *)&sin, sizeof(sin));sin.sin_family = AF_INET;bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length);sin.sin_port = htons(SERVER_PORT);/* active open */if ((s = socket(PF_INET, SOCK_STREAM, 0)) < 0) {perror("simplex-talk: socket");exit(1);}if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {perror("simplex-talk: connect");close(s);exit(1);}/* main loop: get and send lines of text */while (fgets(buf, sizeof(buf), stdin)) {buf[MAX_LINE-1] = ’\0’;len = strlen(buf) + 1;send(s, buf, len, 0);}
}
this one from client
where to put this code
dont tell me that i need microsoft visual studio
because i dont have it

but if i run it from there how the communication will happen between microsoft visual studio
and fedora linux which is run virtually

oh gosh
i really got tired
from searching for a week and no no no no result
i hope that some one can help