Wht you mean by this declaration..

C

code break

Hi all,

i come across the following declaration in some code.

int (*ptr)[ 10];

any feedback helps a lot for me.
 
M

matevzb

code said:
Hi all,

i come across the following declaration in some code.

int (*ptr)[ 10];

any feedback helps a lot for me.
There's a utility called cdecl that can translate C into english and
vice versa:
cdecl> explain int (*i)[10];
declare i as pointer to array 10 of int
Beware though, some (all?) versions of cdecl seem to have some reserved
keywords, so you'd get a syntax error in your case:
cdecl> explain int (*ptr)[10];
syntax error
Just change ptr into something else and it should work.
 

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
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top