Hi can anyone help me with this programming question? question: I have made 1 process struct and a table of thread structs, what i want is to have a pointer from the process struct to the first struct in the thread struct table. How do i make such a pointer?
se code below
best regards hans
struct { int member1 int member2 int member3 int member4 pointer to thread struct??? }process[no_of_processes];
struct { int member1 int member2 int member3 int member4 }thread[no_of_threads];
const int no_of_processes = 2; const int no_of_threads = 2; struct { int member1; int member2; int member3; int member4; struct{ int member1; int member2; int member3; int member4; }thread[no_of_threads]; }process[no_of_processes];
the code compiles and runs without errors. The "process[0].threads[0].menber1 = 10" way of assignment should apply to all the other structure members as well.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.