any borland helpers
-
greetings I am really sorry to bother you but i have a slight problem. i am a university student in England, and i am doing a final year project called Web based home automation which means i have to control devices over the internet. the problem is that i have to use borland C++ to write a client/server program to be able to remotely control devices over the internet. The problem is that i have tried to work with borland C++ version 5.01 but i am unable to do this because, although i know the basics of programming in c,c++,assembly i am someone who is aimed at automation and not really programming. i basically need to write a simple client/server chat program in c/c++ with borland, and then elaborate on it to enable controlling devices. please help me, i am really stressed out. i extremely appreciate any help you can give me! from Chris
-
greetings I am really sorry to bother you but i have a slight problem. i am a university student in England, and i am doing a final year project called Web based home automation which means i have to control devices over the internet. the problem is that i have to use borland C++ to write a client/server program to be able to remotely control devices over the internet. The problem is that i have tried to work with borland C++ version 5.01 but i am unable to do this because, although i know the basics of programming in c,c++,assembly i am someone who is aimed at automation and not really programming. i basically need to write a simple client/server chat program in c/c++ with borland, and then elaborate on it to enable controlling devices. please help me, i am really stressed out. i extremely appreciate any help you can give me! from Chris
You got all the way to your final year and have just realised you are not a programmer? :rolleyes: I suggest that you quit and find a different degree to do. Though I would be surprised that you find one where plagiarism is accepted. :| Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain) -
You got all the way to your final year and have just realised you are not a programmer? :rolleyes: I suggest that you quit and find a different degree to do. Though I would be surprised that you find one where plagiarism is accepted. :| Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)hahaha you're so funny! 1st: who told you thet i was in a programming course? 2nd: its nice to laugh at others problems untill you get one hey? 3rd:plagerism means cheating/copying...i am not asking for someone to write code for me, i just want some advice so if you are too good to help, MIND YOUR OWN BUSINESS! thanks
-
hahaha you're so funny! 1st: who told you thet i was in a programming course? 2nd: its nice to laugh at others problems untill you get one hey? 3rd:plagerism means cheating/copying...i am not asking for someone to write code for me, i just want some advice so if you are too good to help, MIND YOUR OWN BUSINESS! thanks
porac69 wrote: 1st: who told you thet i was in a programming course? You were asking a programming question in a programming forum. It would be easy to assume you are therefore in a programming course. porac69 wrote: i am not asking for someone to write code for me, i just want some advice so if you are too good to help, MIND YOUR OWN BUSINESS! "Please do my homework for me" type requests show up here at least once per week, especially as semesters come to an end. Don't take offense to Antony's comment as it is well-founded. While yours is not the worst by far, students do come here and type in their assignments verbatim and expect to get help. My first question would by why is using Borland C++ a requirement? Second, how much help are you expecting to receive from a forum devoted to Microsoft Visual C++? That's not to imply that you won't get help, but just that your chances are less, compared to the help you'd receive from a forum devoted to Borland C++. Make sense? I put together a very simple server application that listens on port 13. When it gets a request, it sends some text back to the client. I've removed the error checking for brevity.
void main( void )
{
WSADATA wsaData;
int rVal;
char Str[32];
SOCKET client;WSAStartup(MAKEWORD(1,1), &wsaData); //create socket SOCKET s = socket(PF\_INET, SOCK\_STREAM, IPPROTO\_TCP); //fill in sockaddr\_in struct SOCKADDR\_IN sin, clientaddr; sin.sin\_family = PF\_INET; sin.sin\_port = htons(13); sin.sin\_addr.s\_addr = INADDR\_ANY; //bind the socket rVal = bind(s, (LPSOCKADDR) &sin, sizeof(sin)); //get socket to listen rVal = listen(s, 2); while (1) { int addrlen = sizeof(clientaddr); //wait for a client client = accept(s, (struct sockaddr \*) &clientaddr, &addrlen); if (client < 0) continue; char \*clienthost = inet\_ntoa(clientaddr.sin\_addr); int port = ntohs(clientaddr.sin\_port); fprintf(stderr, "Received request from \[%s\] on port \[%d\]\\n", clienthost, port); sprintf(Str, "Hello %s on %d", clienthost, port); rVal = send(client, Str, lstrlen(Str), 0); closesocket(client); fprintf(stderr, "Sent %s to client\\n", Str); } closesocket(s); WSACleanup();
}
"When I was born I was s
-
porac69 wrote: 1st: who told you thet i was in a programming course? You were asking a programming question in a programming forum. It would be easy to assume you are therefore in a programming course. porac69 wrote: i am not asking for someone to write code for me, i just want some advice so if you are too good to help, MIND YOUR OWN BUSINESS! "Please do my homework for me" type requests show up here at least once per week, especially as semesters come to an end. Don't take offense to Antony's comment as it is well-founded. While yours is not the worst by far, students do come here and type in their assignments verbatim and expect to get help. My first question would by why is using Borland C++ a requirement? Second, how much help are you expecting to receive from a forum devoted to Microsoft Visual C++? That's not to imply that you won't get help, but just that your chances are less, compared to the help you'd receive from a forum devoted to Borland C++. Make sense? I put together a very simple server application that listens on port 13. When it gets a request, it sends some text back to the client. I've removed the error checking for brevity.
void main( void )
{
WSADATA wsaData;
int rVal;
char Str[32];
SOCKET client;WSAStartup(MAKEWORD(1,1), &wsaData); //create socket SOCKET s = socket(PF\_INET, SOCK\_STREAM, IPPROTO\_TCP); //fill in sockaddr\_in struct SOCKADDR\_IN sin, clientaddr; sin.sin\_family = PF\_INET; sin.sin\_port = htons(13); sin.sin\_addr.s\_addr = INADDR\_ANY; //bind the socket rVal = bind(s, (LPSOCKADDR) &sin, sizeof(sin)); //get socket to listen rVal = listen(s, 2); while (1) { int addrlen = sizeof(clientaddr); //wait for a client client = accept(s, (struct sockaddr \*) &clientaddr, &addrlen); if (client < 0) continue; char \*clienthost = inet\_ntoa(clientaddr.sin\_addr); int port = ntohs(clientaddr.sin\_port); fprintf(stderr, "Received request from \[%s\] on port \[%d\]\\n", clienthost, port); sprintf(Str, "Hello %s on %d", clienthost, port); rVal = send(client, Str, lstrlen(Str), 0); closesocket(client); fprintf(stderr, "Sent %s to client\\n", Str); } closesocket(s); WSACleanup();
}
"When I was born I was s
thanks alot its just that ive been in front of the pc screen for 3 nights without more than 2 hours sleep. i must use borland because that is a specification i started off with. i am not useless...i do know how to program but i am not familiar with internet programming and all those .cpp .dll . ... files make me confused, especially when youre in front of a pc for so long trying your best. i believe no-one knows everything so why not learn from eachother?!? thank you once again ;)
-
thanks alot its just that ive been in front of the pc screen for 3 nights without more than 2 hours sleep. i must use borland because that is a specification i started off with. i am not useless...i do know how to program but i am not familiar with internet programming and all those .cpp .dll . ... files make me confused, especially when youre in front of a pc for so long trying your best. i believe no-one knows everything so why not learn from eachother?!? thank you once again ;)