Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 5-0-19: array of pointer, instead of, pointer to array
#1
Regarding these declarations:
Code:
int8_t * ptr6[ 10 ];
int8_t ** ptr7[ 10 ];

There are two type of explanations used:
  • pointer to array of some data type
  • array of pointer to some data type
I think the former style is more accurate, read more below:

In "Explanation of types" section, it is stated:
Quote:ptr6 is of type pointer to array of int8_t

Actually, it was expected to be stated this way:
ptr6 is of type array of pointer to int8_t

As a comparison, it is stated some lines later that:
Quote:ptr7 is of type array of pointer to pointer to int8_t

which is exactly accurate.

What is your idea?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)