Ask coding questions

← Back to all posts
I have one error and I need assitance
jnrob900 (0)

void run_simulation(struct dining_room *room)
{

    pthread_t threads[1000];
    
    display_headings(room);
    
    display_states(room);
    
    for (int i = 0; i < room->num_phils; i ++)
    {
            
          start_philosopher(room >num_phils;[i]); //error here
            
    }
    

}

Comments
hotnewtop
Coder100 (18893)

you made a typo it is

start_philosopher(room->num_phils[i]);

the arrow operator looks like this: ->

also you added an extra semicolon.

next time please do not repost.