Search:

Type: Posts; User: mothermole1

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    28,485

    I managed to fix the code, I used a scanf into...

    I managed to fix the code, I used a scanf into the buf

    scanf("%s",buf);


    then called strdup on buf and cast the return as char*, this seemed to clear it up

    node->students[n].name =...
  2. Replies
    5
    Views
    28,485

    Thanks I came from Java :) The compiler has an...

    Thanks I came from Java :)
    The compiler has an error with the code you provided:
    Implicit declaration of function strdup and
    Assignment make pointer from integer without cast

    I'm also using...
  3. Replies
    5
    Views
    28,485

    C assign value to char pointer in struct

    Hi,

    I'm having a problem assigning a value to a pointer in one of my structs

    This is the struct definition

    typedef struct student *student_ptr;
    struct student
    {
    int ID;
Results 1 to 3 of 3