I'm am trying to learn about sockets by writing a simple chat client. Basically, multiple users will be able to connect to a server which will relay the messages back to each user
At the moment it does not relay messages back. This is because connecting multiple users seems to cause a problem...
Somebody at at the office needs us to recover information of of a linux HD that won't boot, so we plugged it into our Redhat machine, and the partitions on it are as follows:
/dev/sdb1 - boot
/dev/sdb2 - swap
/dev/sdb3 - LVM
Unfortunately, since all the infomation about the volume groups in...
I'm trying to create a simple test server in linux (which I basically just copied from an example to see how it works). However, early on in the program when socket(PF_INET, SOCK_STREAM, IPPROTO_TPC) is called, the program hangs. It compiles fine, and gdb doesn't show any of my variables being...
Alright. As sort of an experiment I wanted to see if I could make a Vector (expandable array) in C, kinda like the Vector class in Java, only this one holds a specific type of structure. It appears to be fairly successful, although it is very simple at this point. Anyway, I was hoping someone...
Quick syntax question
If I have some field **go
and I say *go = malloc(sizeof(whatever))
If go is a field in struct v, how would I achieve the same thing? For example, "v->go = malloc" would be the same thing as go = malloc, but I need *go = malloc.
I'm attempting to write a method that splits a string up (according to a delimiter) into an array of strings, which returns at the end of the function. This problem gets a little hairy. Here's the current function:
char** splitString(char *c_str, int len, char delim)
{
char **temp;
char...
Heya. I have yet another question about pointers and 2D arrays, this time dealing with strings (also, thanks to the guy who helped me last time, it was mighty useful).
When using ints I first allocated memory for the array of pointers, then allocated memory for each pointer, and in doing so...
I have a quick question about the nature of making a 2D array using pointers, as in
int **v;
I tried making a little piece of code like this:
int **twoDee;
int i, j;
twoDee = (int**)malloc(X*Y*sizeof(int));
twoDee[2][1] = 5;
printf("%d", twoDee[2][1]);
This was just so I...
Actually, this is more of a general question, but I'm really new to the C and C++ languages, and since I've only ever really used Java and it's standard libraries, I'm unsure about how to link things in C (or C++, but I'm just using C for now)
Right now, I'm trying to use an example on Winsock...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.