Click here to Skip to main content
15,887,350 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionconvert CString to unsigned short Pin
Member 365375125-Apr-10 23:22
Member 365375125-Apr-10 23:22 
AnswerRe: convert CString to unsigned short Pin
Adam Roderick J25-Apr-10 23:39
Adam Roderick J25-Apr-10 23:39 
GeneralRe: convert CString to unsigned short Pin
Member 365375126-Apr-10 0:07
Member 365375126-Apr-10 0:07 
GeneralRe: convert CString to unsigned short Pin
Richard MacCutchan26-Apr-10 0:13
mveRichard MacCutchan26-Apr-10 0:13 
AnswerRe: convert CString to unsigned short Pin
Richard MacCutchan26-Apr-10 0:07
mveRichard MacCutchan26-Apr-10 0:07 
QuestionData encapsulation in C Pin
krish_kumar25-Apr-10 23:00
krish_kumar25-Apr-10 23:00 
AnswerRe: Data encapsulation in C Pin
Eugen Podsypalnikov25-Apr-10 23:17
Eugen Podsypalnikov25-Apr-10 23:17 
AnswerRe: Data encapsulation in C Pin
Moak25-Apr-10 23:41
Moak25-Apr-10 23:41 
Encapsulation is definitely my favourite feature of object oriented programming. In plain old C you have structs and unions to group variables together, though the access rights are limited. You can use "internal data structures" by not exposing them outside your module, for example by declaring them static in a C source file. With a little bit of organisation you can have "inner/outer" variables.

So instead of the complier enforcing these access rights, the developer has to do it in C. It's really not much more than that, for example take a C++ class with private members and compile it into an object file or library. Then make a copy of the header file, change private to public... voila you can access all previously private members and the compiler/linker won't complain. Evil but possible. Smile | :)

Hope it helps!
/M

Webchat in Europe Java | [Coffee] Now with 26% more Twitter


GeneralRe: Data encapsulation in C Pin
SachinBhave25-Apr-10 23:57
SachinBhave25-Apr-10 23:57 
AnswerRe: Data encapsulation in C Pin
Adam Roderick J25-Apr-10 23:48
Adam Roderick J25-Apr-10 23:48 
AnswerRe: Data encapsulation in C Pin
Chris Losinger26-Apr-10 1:42
professionalChris Losinger26-Apr-10 1:42 
GeneralRe: Data encapsulation in C Pin
Nemanja Trifunovic26-Apr-10 5:09
Nemanja Trifunovic26-Apr-10 5:09 
AnswerRe: Data encapsulation in C Pin
Joe Woodbury26-Apr-10 6:24
professionalJoe Woodbury26-Apr-10 6:24 
Questionhow to get cdrom serial number Pin
EverettJF25-Apr-10 22:18
EverettJF25-Apr-10 22:18 
QuestionRe: how to get cdrom serial number Pin
CPallini25-Apr-10 22:27
mveCPallini25-Apr-10 22:27 
AnswerRe: how to get cdrom serial number Pin
EverettJF25-Apr-10 22:46
EverettJF25-Apr-10 22:46 
AnswerRe: how to get cdrom serial number Pin
SachinBhave25-Apr-10 23:25
SachinBhave25-Apr-10 23:25 
GeneralRe: how to get cdrom serial number Pin
EverettJF26-Apr-10 0:24
EverettJF26-Apr-10 0:24 
AnswerRe: how to get cdrom serial number Pin
SachinBhave26-Apr-10 0:42
SachinBhave26-Apr-10 0:42 
GeneralRe: how to get cdrom serial number Pin
EverettJF26-Apr-10 20:32
EverettJF26-Apr-10 20:32 
AnswerRe: how to get cdrom serial number [modified] Pin
Michel Godfroid25-Apr-10 23:26
Michel Godfroid25-Apr-10 23:26 
GeneralRe: how to get cdrom serial number Pin
EverettJF26-Apr-10 0:28
EverettJF26-Apr-10 0:28 
QuestionSelf-Extractor Pin
bharathkumarreddys25-Apr-10 21:51
bharathkumarreddys25-Apr-10 21:51 
AnswerRe: Self-Extractor Pin
CPallini25-Apr-10 22:23
mveCPallini25-Apr-10 22:23 
GeneralRe: Self-Extractor Pin
bharathkumarreddys25-Apr-10 22:31
bharathkumarreddys25-Apr-10 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.