Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Guest42
  • Content: Threads
  • Order by date
  1. Guest42

    accept() returns 0

    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...
  2. Guest42

    LVM recovery

    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...
  3. Guest42

    socket() hangs up in Linux

    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...
  4. Guest42

    Review my Vector Code?

    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...
  5. Guest42

    Pointer/struct syntax

    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.
  6. Guest42

    Odd strtok issue

    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...
  7. Guest42

    Strings and pointers

    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...
  8. Guest42

    Double arrays with pointers

    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...
  9. Guest42

    linking Winsock

    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...

Part and Inventory Search

Back
Top