C++ in ternms of C




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
------------------------------------------------------------------------



.



Relevant Pages

  • Re: C++ in ternms of C
    ... I tried to analise the ASM file produ ced my the VC++ compil er. ... > private and which data is public. ... > epresented by the c++ compiler in translation to intermediate stage. ...
    (microsoft.public.vc.language)
  • Re: C++ in ternms of C
    ... 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. ... 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. ... If a program compiles, then all accesses are known to be legal, so there is no need to keep a record of access rights in the .exe file. ...
    (microsoft.public.vc.language)
  • optimizers are overrated
    ... I started learning ASM not long ago to improve my understanding of the ... The first function uses a typical C style loop to ... which one is more efficient all you guys would reply "the compiler will most ... so my "write C like ASM" optimization worked. ...
    (comp.lang.c)
  • XML-based object orientated pre-Assembler
    ... I have been promising an object orientated ASM IDE for a while now. ... Trying to make the best of what is already here, I have made a compiler, ... that will parse XML code and output ASM files. ...
    (alt.lang.asm)
  • Re: C++ in ternms of C
    ... >about class and struct difference. ... How is the private and public part ... I tried to analise the ASM file produ ced my the VC++ compil er. ... >epresented by the c++ compiler in translation to intermediate stage. ...
    (microsoft.public.vc.language)

Loading