Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: Getting mem...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 13 Topic 9567 of 9831
Post > Topic >>

Re: Getting memory size

by Francis Glassborow <francis.glassborow@[EMAIL PROTECTED] > May 3, 2008 at 04:10 PM

Nimish wrote:
> { Don't top-post nor quote the clc++m banner. -mod }
> 
> Hi
> 
> Here b is being used.
> I want to get memory size using pointer "a"..
> if I perform the same operation on pointer a it gives me 8 bytes i.e.
> size of the pointer not the size of the memory allocated to the
> pointer.
> 
> regards
> Nimish
> 
And that is the way it is designed to work. As I wrote before (along
with several others) you cannot do what you want in C++. Now there are
fine ways of achieving the functionality but not with raw pointers.
std::vector would be a typical alternative.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 13 Posts in Topic:
Getting memory size
Nimish <nimish.bhargav  2008-05-01 13:11:49 
Re: Getting memory size
red floyd <no.spam@[EM  2008-05-02 03:16:06 
Re: Getting memory size
=?ISO-8859-1?Q?Daniel_Kr=  2008-05-02 04:43:59 
Re: Getting memory size
Ron Natalie <ron@[EMAI  2008-05-02 04:43:40 
Re: Getting memory size
Jack Klein <jackklein@  2008-05-02 04:43:52 
Re: Getting memory size
Ulrich Eckhardt <dooms  2008-05-02 04:43:35 
Re: Getting memory size
Francis Glassborow <fr  2008-05-02 04:43:59 
Re: Getting memory size
Ian Collins <ian-news@  2008-05-02 04:43:25 
Re: Getting memory size
"Bob" <nospa  2008-05-02 04:43:55 
Re: Getting memory size
Mathias Gaunard <loufo  2008-05-02 04:43:26 
Re: Getting memory size
Nimish <nimish.bhargav  2008-05-02 12:44:58 
Re: Getting memory size
Michiel.Salters@[EMAIL PR  2008-05-02 12:43:56 
Re: Getting memory size
Francis Glassborow <fr  2008-05-03 16:10:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 21:57:10 CDT 2008.