Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Specifying array types.

Thread Tools

Specifying array types.

Posts: n/a
On Feb 25, 8:09*pm, "(E-Mail Removed)"
<(E-Mail Removed)> wrote:
> On Feb 25, 3:00 pm, Andrey Tarasevich <(E-Mail Removed)>
> wrote:
> > const double (*dataptr)[2] = data;

> Thanks. Is that just a matter of memorizing things, or is there some
> rule that you can use to figure out how to declare types like that?

In addition to what others have said, I'd add that this is
one of those things that looks very complicated when spelled
out in an algorithm, but is a lot easier in practice - sort
of like riding a bicycle. You could informally summarise reading
a decaration as "start in the middle, start going right, and then
ricochet between parens". At least this is how I mentally model
it when I'm doing it !
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Q: Re-ordering array by specifying first-entry Tuxedo Javascript 4 09-01-2008 06:03 PM
Specifying global array size with const int C Programming 4 09-02-2005 08:46 AM
Specifying vector length in the function output valentin tihomirov VHDL 1 06-28-2005 06:52 PM
Specifying generics in configuration valentin tihomirov VHDL 14 01-07-2004 05:27 PM
Specifying string array as an attribute in HTML tag Jeff 'Jones' Putz ASP .Net Building Controls 0 07-28-2003 12:21 AM