Delete Post

delete..
Last edited on
Hello F95,

I tried to compile you program, but it did not work because of all the errors in the code.

My pointer points to value of type int and only one identifier is of type int, the rest are char . How do I fix this?

Well in your Airlines::appendNode() function half your problem is that the lhs of the = is pointing to an "int" and the rhs is using a "char" array. They do not match. Second with a char array the strcpy() function would most likely be needed to set what should be on the lhs side of the = instead of using the =. It would work better changing "FName, LName and Priority" to strings.

Lines 31 - 60 have several problems that need fixed. Lines 38 and 51 re re-definitions of line 31 and are not really needed. Each bit of code starting at lines 31, 38 and 45 have several problems. For example line 34 the lhs evaluates down to an "int" while the rhs is a char array and at this point it has no value because you give it a value on the next line. This is one of your type mismatches.

On lines 55 and 57 you are trying to compare a single character to the entire array and not one element of the array. Actually char Priority[PSIZE]; would work better as char Priority; since it looks like only one character is needed.

There is a start.

Hope that helps,

Andy
Hello F95,

Pick which thread and code you are going to use.

Andy
Topic archived. No new replies allowed.