Thank you hk_mp5kpdw,
The code works like a charm, my only question left is can I seperate all the '0' and '1' into an array?
Eg
//dec=101
bin[0] = 0;
bin[1] = 1;
bin[2] = 1;
Type: Posts; User: devour89
Thank you hk_mp5kpdw,
The code works like a charm, my only question left is can I seperate all the '0' and '1' into an array?
Eg
//dec=101
bin[0] = 0;
bin[1] = 1;
bin[2] = 1;
Hey,
It has been a while since I've programmed in C++, but some school thing just turned up and it came in handy.
I've created a function to make a binary code from any number under 255, (ASCII...
Edward, could you explain what your code does? I'm intrested in making some sort of table with results from a computer simulation, but I can't seem to figure out exactly how your code works...Well in...
I know the basics of socket programming, and not more then that.
But what I would like to do is make a program that lists all the computers on a Local Area Network and underneath each name display...
I learned it from: http://www.madwizard.org
Even though his tutorial isn't finished yet, its been a great explenation for me
Dude to get ASCII code do this:
#include <iostream>
using namespace std;
int main()
{
char letter;
Dude, I don't know exactly but there are some nice functions in the string.h header file.... maybe you can use those....
Use google to find out more about them
Not recommended but effective.......:D
Thanx for all the help! It works now!
if((numbytes = recv(fd2,buf,MAXDATASIZE,0)) == SOCKET_ERROR)
{
cout<<"Recieving Error\n"<<strerror(WSAGetLastError()) ;
return -1;
}
...
Ok, the compare still doesn't work even after I null terminated the buffer.
Also after recieving the message from the client the server says Accept Error which is earlier on in the code. How does...
Thanx for the quick reply.
#include <winsock2.h>
#include <iostream.h>
#include <windows.h>
#include <fstream.h>
#include <time.h>
#include <string.h>
Are you linking the correct libs?
exit(1) ???
Thanx! It works now after I press enter. Dope I could have thought of it myself with the cin.getline. Ohh well.
How does the server recieve the message if I send the buffer. Is it exit\n or is...
Also another thing I would like to know.
I made the server wait to recieve something but imidietly after I press any key on the client side it shows up on the server. This is partially correct as...
Ok, thanx, the Ip part works now only the time gives me two errors.
1. invalid conversion from 'const char' to 'unsigned int'
2. cannot convert 'tm*' to 'const char' for argument '3' to size_t...
No one? Not even how to just display date and time?
I can't even get passed level 3, someone help me out here plz
Hey all, haven't been to the board in awhile but I have a question on sockets.
I've made a server where a telnet client can telnet to on port 3550, everything works fine. Now I want to extend it...
I tried several, but which one should I choose for Dev C++?? And how would I install it?
Is it possible to run MySQL Queries in C++, if so how do I do this?
1. strcmp() is a function that compares two strings
2. ! is used to mean not equal to 0 because this function returns 0 when the two strings aren't equal.
3. As explained in the code:
...
Go to MSDN site and under File I/O it tells you all the functions needed for your problem
So you are saying I could just have it loop for infinity and wait until it reaches the end?
That solves the problem I guess
Thanx
-Devouring One-