C++ in ternms of C
- From: DeltaOne <DeltaOne.1ntz5w@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Apr 2005 00:56:05 -0500
Hi, I am planning to study how we can implement things that we implement
in c++ in c and using a bit asm also. First thing i want to know is
about class and struct difference. How is the private and public part
implemented in the c++ exactly or how is the internal representation
done. I tried to analise the ASM file produ ced my the VC++ compil er.
But there i wrote the following code class t{ private: __int8 i;
public: void valF(); }; int main(){ t dat; t dat1; t p; dat.valF();
p.valF(); dat1. valF(); return 1; } void t::v alF(){ i=3; return ; } in
the above class "t" i changed the specif ier of "i" from private to
public. but in both cases th e ASM code generated was same. Even the
exe file was same.Then how in the ru n time it knows which data is
private and which data is public. Is is implem ented by the runtime
libraries? or how? is there any site or book from which i can ge t more
info on it? Please let me know this first case.Hos can i im plement this
private and public thing in C and if required some ASM inline a lso. I
want to use a pure C compiler for this not a C++ compiler.How is it r
epresented by the c++ compiler in translation to intermediate stage.
--
DeltaOne
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
.
- Follow-Ups:
- Re: C++ in ternms of C
- From: Greg Comeau
- Re: C++ in ternms of C
- From: Severian [MVP]
- Re: C++ in ternms of C
- From: Mark Randall
- Re: C++ in ternms of C
- From: Doug Harrison [MVP]
- Re: C++ in ternms of C
- From: John Carson
- Re: C++ in ternms of C
- From: Eberhard Schefold
- Re: C++ in ternms of C
- From: abc
- Re: C++ in ternms of C
- Prev by Date: Re: dll hooking
- Next by Date: Use of 'typename'
- Previous by thread: how can I roll text down and up in my CRichEditCtrl in my programme?
- Next by thread: Re: C++ in ternms of C
- Index(es):
Relevant Pages
|
Loading