On Tue, 2007-05-22 at 13:08 -0600, David B Darrough wrote: > OK, I have another question that has bugged me for years: How do you create > a dynamically allocated array at runtime in C++? As I understand it, you > can't use variables for the dimensions so that the array is sized at > runtime.
Welcome to the joy of pointer pointers. I'm not going to bother
explaining them, others already have, instead I'm going to point out
that you're not a real C programmer until you can handle pointer
pointers without blinking. (I was about to say, without making a
mistake, but that's too much to ask for in C isn't it?)
For real fun, ponder the pointer pointer pointer. Rarely sighted in the
wild, but sometimes unavoidable. Blew my mind the first time I ran into
one.
I cower in fear before the pointer pointer pointer pointer, but
thankfully I'm pretty sure that such a beast would never be necessary in
the real world.
--
Stuart Jansen e-mail/jabber: [EMAIL PROTECTED]
google talk: [EMAIL PROTECTED]
"However beautiful the strategy, you should occasionally look at
the results." -- Winston Churchill
signature.asc
Description: This is a digitally signed message part
-------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
