473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

int (*varname)[4][4]; ???

What exactly does the following do (and what memory does it allocate?)

int (*varname)[4][4];
Mar 13 '08 #1
2 1490
julvr <no****@ulvr.comwrites:
What exactly does the following do (and what memory does it allocate?)

int (*varname)[4][4];
It declares varname as a pointer to an 4-element array of
4-element arrays of ints.
--
"I've given vodka years and years of oral pleasure, and it's done the
same for me. And neither of us has really taken any steps to take the
relationship to the `next level.'"
--Jeremy Hunt
Mar 13 '08 #2
On Mar 13, 4:18 pm, julvr <nos...@ulvr.comwrote:
What exactly does the following do (and what memory does it allocate?)

int (*varname)[4][4];
C++'s declaration syntax (inherited from C) is
indeed a nightmare. You should definitely read
Chapter 3 of Peter van der Linden's "Expert C
Programming", a wonderful and hilarious book which
gives a nice decoder ring for making sense
of these things (the one you mentioned isn't
anywhere near as bad as it gets when pointers
to functions get involved).

Also, check out SPECS, which is a syntax-change-only
reskinning of C++ (with an amusing nod to C++'s original
name). I'm not suggesting you program in it, but
it's nice to realize that the declaration syntax
is historical cruft from a failed experiment, not
something inherently unsound about the language.

http://en.wikipedia.org/wiki/Signifi...C%2B%2B_Syntax
Sean

Mar 13 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: News | last post by:
All, I have some code that works just fine when register_globals is on, however, for obvious reasons, I am trying to rework the code so that I can disable register_globals. I have set my...
16
by: herbertF | last post by:
Hi guys, In a program (not my own) I encountered the declaration of a constant pointer to an array consisting of two other const pointers to arrays. Not quite sure why they do it so complicated,...
2
by: Neo The One | last post by:
I read thru MSDN documentation but could not find syntax explanation about this special form of declaration. Need more information on this.
11
by: bofh1234 | last post by:
Hello, I am having a problem with linked lists. My program is based on a client server model. The client sends some packets of data to the server. The server reads those packets and is...
16
by: Preben Randhol | last post by:
Hi A short newbie question. I would like to extract some values from a given text file directly into python variables. Can this be done simply by either standard library or other libraries? Some...
4
by: stiki | last post by:
How and what does this mean in php: ($this->varname) I can't seem to find this by searching Google, because the "->" are removed from my search query. Cheers, Igor Terzic www.stikimedia.com
13
by: JBuckland | last post by:
Im trying to create a 7 segment display for a project in visual basic 2005 express edition. I have a 2 dimentional boolean which stores the values of each of the segments for a certain display. I...
7
by: Luna Moon | last post by:
Hi all, I just couldn't get myself clear about the usage of "const" in front of and/or behind variables, pointers, classes, objects and functions... It's too confusing... any good clear...
2
by: ajd335 | last post by:
Hey all, I am trying to execute lpr command from PHP script using sell_exec . If I write like below $fin = shell_exec( "lpr -Pprinter1 $str"); Its working fine But in my application user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.