By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,851 Members | 2,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,851 IT Pros & Developers. It's quick & easy.

How to access symbol when its dimensionality is not known till runtime (About to giveup)

P: n/a
Hi,

Is it possible to access the actual value of a symbol at runtime when
you don't know it's definition till then. The symbol can be a variable,
a 1 dimensional array, a 2 dimensional array, or a 3 dimensional array?

If this is possible can you post example code for each case.

(Background: The compiler complains if I just use pointers with nested "if"
statements complaining 3 of the 4 assignments are not defined [identifier
is undefined]. I'm using this code on SGI machines and object code doesn't
contain dimensionality information, only the number of elements [obtained
through the system command dwarfdump on the object code].)

Thank you,
Christopher Lusardi
Nov 14 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Christopher M. Lusardi wrote:
Hi,

Is it possible to access the actual value of a symbol at runtime when
you don't know it's definition till then. The symbol can be a variable,
a 1 dimensional array, a 2 dimensional array, or a 3 dimensional array?

If this is possible can you post example code for each case.

(Background: The compiler complains if I just use pointers with nested "if"
statements complaining 3 of the 4 assignments are not defined [identifier
is undefined]. I'm using this code on SGI machines and object code doesn't
contain dimensionality information, only the number of elements [obtained
through the system command dwarfdump on the object code].)


Is this C or C++ ?

If you are using C, there are other ways to do what (I think) you're
trying to do.

Don't let us guess, what exactly are you trying to do ? There may be a
standards compliant way to do it.

Nov 14 '05 #2

P: n/a
Christopher M. Lusardi wrote:
Hi,

Is it possible to access the actual value of a symbol at runtime when
you don't know it's definition till then. The symbol can be a variable,
a 1 dimensional array, a 2 dimensional array, or a 3 dimensional array?

If this is possible can you post example code for each case.

(Background: The compiler complains if I just use pointers with nested "if"
statements complaining 3 of the 4 assignments are not defined [identifier
is undefined]. I'm using this code on SGI machines and object code doesn't
contain dimensionality information, only the number of elements [obtained
through the system command dwarfdump on the object code].)

Thank you,
Christopher Lusardi


This a FAQ:
http://www.parashift.com/c++-faq-lit...tore-mgmt.html
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Nov 14 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.