Sorry about the crap questions, I can tell I need to brush up on my strings.
Type: Posts; User: klipseracer
Sorry about the crap questions, I can tell I need to brush up on my strings.
I understand now, I tried to make it 2000, which is way too big, and if sprintf_s needs the size to be exact, then that makes sense, In any case i'm now making great use of std::string!! Btw, how...
Well, not to beat a dead horse, but I still don't understand where I went wrong. I pass the size of the buffer.. Or does it need the sizeof()??? I'm lost
this is the code that i've been trying to...
THANK YOU SO MUCH!!!!!!!!!!!!!!!!
I will try this later.
/bowdown
Hell, you should see the way I currently have it set up. its done all manually. I'll definately look into stringstream. Put it this way, I never took any coding classes, and i'm dependent on using...
More than anything i was asking about syntax correctness...
In any case, it gives me a 'Buffer too small',0 Error in the window that pops up, then when JIT catches it it opens up dbgrptt.c and...
Ok, so now i have a new problem. This code doesn't work:
RandomVar=(22+client[cNum].nicklen);
RandomData= new char[RandomVar];
sprintf_s(RandomData,RandomVar,":%s!u@h PART...
i think i've fixed it, i'll repost with correct question in a sec
here was my question:
Ok, i'm on VS2005 and i've got this line of code:
sprintf_s(RandomData,client[cNum].Name,":%s!u@h...
i've found that closing the socket automatically adds the FIN.
Ok, so i'm working on this server program, and I want to tell my client that its the last data packet that i'm sending by passing the FIN flag WITH the data.
DATA + FIN, PSH, ACK -> Client
ACK ->...
I've found that if I comment out
AcceptSocket = accept(m_socket, NULL, NULL);
the program doesn't hang, and it works like normal, but of course the connections aren't made.
EDIT:
I use VC++ 2005 and i have a form for the GUI, its dialog based with a LIST that I output to.
The code i'm showing here actually isn't the same code with the select() but I can post it if you want....
Ok, so I've done a select server before, but i've lost my code and I need the same flexability for a new app i'm making. There are a couple problems. When I run the program, the sockets seam to bind...
I looked through the properties for something like that before, but hopefully I missed it, Thanks! I'll try this when I get home.
Ok, I have a list box, and i've been considering converting to a Listview, but for temporary purposes, how do I get my listbox to not be alphabetized? I have it as a log window and it dumps a TON of...
I have a list box as my main window, with also a File, Tools etc menu on it. I just open up a dialog as the main 'window' without all that extra window crap, then used Visual Studio to make a List...
well, thats good to know I suppose. I really just don't see any functions from the 'printf' derivation show up much without being in a .c source. I like printf a lot more anyhow for most things :)
Thanks, worked great. I don't think there is any way to do this in true cpp and not C, is there?
you can use
Buffer = new char[szBuffer]; for dynamically creating a buffer of any size on the fly.
but you can't change the size of an existing buffer, at least not that I am aware of...
Ok, so I've got a Dialog, with a listbox inside of it. I want to display a hex calue in '0xFF' format, or even just 'FF'. I'm trying to use this list box as a crappy debug/log window for a program...