From 4139876450480851053
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,24d6aa350e7865ed
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-01-15 07:12:01 PST
Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Michiel.Salters@cmg.nl (Michiel Salters)
Newsgroups: comp.std.c++
Subject: Re: Memory layout of an object
Date: Tue, 15 Jan 2002 15:11:16 GMT
Organization: http://groups.google.com/
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <cefd6cde.0201150054.9c53da1@posting.google.com>
References: <a1sche$cdo$07$1@news.t-online.com>
X-Trace: mail2news.demon.co.uk 1011107481 mail2news:13315 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Date: 15 Jan 2002 08:54:09 GMT
Lines: 22
Xref: archiver1.google.com comp.std.c++:9052

"jum" <juergen_3333@gmx.de> wrote in message news:<a1sche$cdo$07$1@news.t-online.com>...
> Hi,
> is the memory layout (data, function pointers) of an object of a class ISO
> specified?
> Best Regards
> Juergen

Mostly not.
There are some things you can depend on: The order of members in the
layout is the same as the order of declaration, if they are in the
public/protected/private section. For POD classes, you can use the
offsetof macro and get integral offsets; for other classes you can
use pointers to members which encapsulate the offsets.

Regards,

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



