English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Error message==error C2040: 'list' : 'group *[10]' differs in levels of indirection from 'group [10]'


code struct group *list[MAX];

Anyone know what this means?

2007-02-15 08:02:31 · 4 answers · asked by COD 3 in Computers & Internet Programming & Design

4 answers

An expression involving the operators has inconsistent levels of indirection.

In short your expression should either have both arithmetic or both non-arithmetic (such as pointers) to be used interchangeably. You are running into issues where you are mixing a pointer with a reference value.

2007-02-15 08:31:58 · answer #1 · answered by BK 2 · 0 0

You are probably trying to do something like list[10] which is the 11th group pointer in the array. Look at what you are doing to that and see if it is compatible with what you are trying to do.

2007-02-19 06:59:54 · answer #2 · answered by nerd00 2 · 0 0

group *list[MAX];

group *list makes list a pointer, but having the subscript makes it yet another pointer. You need to either drop the [MAX] or * from *list.

2007-02-15 16:32:37 · answer #3 · answered by FireStorm 2 · 0 0

looks like a typo to me

shouldn't 'group *[10]' be '*group[10]'?

it's hard to say without more details, but i don't see how 'group*[10]' could be syntactically correct.

2007-02-15 11:52:35 · answer #4 · answered by fixedinseattle 4 · 0 0

fedest.com, questions and answers