Search:

Type: Posts; User: Grigoris Savvas

Search: Search took 0.02 seconds.

  1. Problem with ignoring "space" character in a string.

    I want to read a number, 4 names (store them in a [N][100] array) and one number string from stdin. The problem is that the last name has space in it "Mc Millan" and i can't get the string whole with...
  2. Thank a lot Tim. I changed the char c to char...

    Thank a lot Tim. I changed the char c to char c[2] and stored the character in c[1], passing c to atoi. The problem is fixed and all the nodes were loaded correctly. Maybe i should give the tihngs as...
  3. Yes i know that atoi is for char *. The argument...

    Yes i know that atoi is for char *. The argument of atoi expects a pointer to a string. But if I use the & is like passing a just the first element of an array, which is not an array but a single...
  4. I posted them for size 10.

    I posted them for size 10.
  5. Thanks that was an error i hadn't notice. But my...

    Thanks that was an error i hadn't notice. But my main problem is not solved yet and i don't think it is a logical neither a syntax error, because the process is the same for all the nodes of the...
  6. The telephone numbers are int[10]. Maybe is the...

    The telephone numbers are int[10].
    Maybe is the OS that screws up the nodes. Something wrong with pointers and access. I thought that may would work in other OS but i don't have the comort to try...
  7. Linked-List fails to load data for 8th node, but loads the other 10. Any clue why?

    I am making a program in C, that creates 2 files for 10 students. First one contains an int id, a char name[10], a char surname[10] and an int year in which a student got into school in each line....
  8. Replies
    2
    Views
    4,473

    Randomized Quicksort problem

    I am trying to make a randomized quicksort. I have try a lot of quicksorts varieties to see if i can work on others but still i cannot make it to run properly. My quicksort sorts an array of structs...
  9. Thanks a lot. I fully understand the realloc...

    Thanks a lot. I fully understand the realloc function and the mistakes of my codes. I will do some more research on casting to undrestand it more. Thanks again!
  10. Yes that's true. My compiler is a C++ one. I...

    Yes that's true. My compiler is a C++ one. I thought realloc copies the previous block of memory to a new one and allocates extra memory equals to the size you give. In my situation i used realloc...
  11. I tried to compile it without the casting at...

    I tried to compile it without the casting at malloc but i got this error: invalid conversion from `void*' to `Student*'
    My problem seemed to be the allocation of realloc. The * (st.size + 1).
    So...
  12. Allocate memory for array that contains struct. Help please.

    Well, I Have 1 struct called Student and 2 called Students. Struct Students has an Array of structs Student. When i pass the second struct after giving the id, name and surname, the program crushes....
Results 1 to 12 of 12