invalid type argument of '->'

N

newbie29

I get this error "invalid type argument of '->'".

It occurs when:

if (num_process->t_pid == -1) {
....
}

I have defined the struct num_process in the same file as where the
above is called.

Please could you explain how to resolve this error?

Thanks.
 
W

Walter Roberson

:I get this error "invalid type argument of '->'".

:It occurs when:

:if (num_process->t_pid == -1) {

:I have defined the struct num_process in the same file as where the
:above is called.

:please could you explain how to resolve this error?

Perhaps this is too superficial, but you said that you defined the
struct num_process -- but the left hand side of the '->' operator
needs to be a pointer to a struct, not a struct itself.
 
N

Norbert Kolvenbach

I get this error "invalid type argument of '->'".

It occurs when:

if (num_process->t_pid == -1) {
...
}

I have defined the struct num_process in the same file as where the
above is called.

Please could you explain how to resolve this error?

Thanks.


Is your "num_process" variable defined as a pointer to struct
num_process?
If not, this may be your problem.

NoKo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,161
Messages
2,570,891
Members
47,423
Latest member
henerygril

Latest Threads

Top