Somebody told me that he could access c++ private data members without using the " Friend" type or public functions.He gave a source code and that was compiled in Turbo c++3.0 :-(
May I post that here?
camelNotation 1
Posting Whiz in Training
Recommended Answers
Jump to PostSure. Is it like via another object of the same class?
Jump to Post#C++ : One-Hour Overview ##(1) User-Defined ADT (Abstract Data Types) e.g.: "enum" creates a user-defined type. enum Months { JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC }; Months x,y; x = FEB; y = DEC; "struct" creates more flexible user-defined …
Jump to PostSure you can access the private members if you know how they're layed out and you are determined to be a hacker. In that case why bother with a new class anyway, why not just use a regular pointer? But, why? What if someone adds a virtual function to your …
All 10 Replies
Dani 4,084
The Queen of DaniWeb Administrator Featured Poster Premium Member
camelNotation 1
Posting Whiz in Training
Valmian 0
Junior Poster in Training
yadi 0
Newbie Poster
Fili 0
Light Poster
meabed 37
Junior Poster Team Colleague
Chainsaw 12
Posting Pro in Training
mike_2000_17 2,669
21st Century Viking Team Colleague Featured Poster
lilov 0
Newbie Poster
tekbhatta 0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.