Click here to Skip to main content
15,906,569 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: image crop Pin
Richard MacCutchan26-May-10 1:50
mveRichard MacCutchan26-May-10 1:50 
Questionwhere to keep textture file in open gl Pin
nearest25-May-10 22:53
nearest25-May-10 22:53 
AnswerRe: where to keep textture file in open gl Pin
Cedric Moonen25-May-10 22:59
Cedric Moonen25-May-10 22:59 
QuestionRetrieve User Details Pin
gothic_coder25-May-10 21:16
gothic_coder25-May-10 21:16 
QuestionRe: Retrieve User Details Pin
David Crow26-May-10 3:10
David Crow26-May-10 3:10 
AnswerRe: Retrieve User Details Pin
gothic_coder26-May-10 3:15
gothic_coder26-May-10 3:15 
Questionneed help regarding Activex control property pages Pin
Sreenivas00325-May-10 21:06
Sreenivas00325-May-10 21:06 
Questionevent for windowless Pin
zon_cpp25-May-10 20:56
zon_cpp25-May-10 20:56 
AnswerRe: event for windowless Pin
KarstenK25-May-10 21:12
mveKarstenK25-May-10 21:12 
QuestionHooking a process creation event Pin
Rajmohan SK25-May-10 19:36
Rajmohan SK25-May-10 19:36 
AnswerRe: Hooking a process creation event Pin
Garth J Lancaster25-May-10 20:40
professionalGarth J Lancaster25-May-10 20:40 
GeneralRe: Hooking a process creation event Pin
Rajmohan SK25-May-10 21:08
Rajmohan SK25-May-10 21:08 
Questionc++ combo box: how to retrieve value selected in a combo box Pin
mrby12325-May-10 18:49
mrby12325-May-10 18:49 
AnswerRe: c++ combo box: how to retrieve value selected in a combo box Pin
KingsGambit25-May-10 19:34
KingsGambit25-May-10 19:34 
AnswerRe: c++ combo box: how to retrieve value selected in a combo box Pin
Sakhalean25-May-10 19:58
Sakhalean25-May-10 19:58 
QuestionOne question about size of empty class... Pin
asadullah ansari25-May-10 16:53
asadullah ansari25-May-10 16:53 
Dont bore of this 80's question...please excuse me for this...
question is very simple...
Why empty class's size is one Byte in C++???

Answer 1:suppose in case of creating array of objects of this empty class, then to distinguish them atleast 1 byte is required ... mE fedup of this answer
My Doubt for this answer : If this reason is valid then why hell in C, empty structure's size is zero... Here also anyone can create the array of objects of this empty structure.Here no neeed to distinguise. Is It ????

Answer 2: Since in C++ provides function members so like
class test
{
};
this is also empty class but by default every class has some default member's function...
test tObject1=test();
test tObject2(tObject1);

or
class test
{
public:
void fun();
};

test obj;
obj.fun();
so to call this function it may required size atleast 1 byte...

BUT I M NOT SUTE FOR WHAT REASON IN C++ THEY HAVE TAKEN 1 BYTE FOR EMPTY CLASS AND ZERO BYTE FOR C....PLEASE U CAN SHARE WHAT'S EXACT REASON????
Truth Can'nt be changed

AnswerRe: One question about size of empty class... Pin
Chris Losinger25-May-10 17:15
professionalChris Losinger25-May-10 17:15 
GeneralRe: One question about size of empty class... Pin
asadullah ansari25-May-10 17:37
asadullah ansari25-May-10 17:37 
GeneralRe: One question about size of empty class... Pin
Luc Pattyn25-May-10 17:57
sitebuilderLuc Pattyn25-May-10 17:57 
GeneralRe: One question about size of empty class... Pin
Emilio Garavaglia25-May-10 21:23
Emilio Garavaglia25-May-10 21:23 
AnswerRe: One question about size of empty class... Pin
Luc Pattyn25-May-10 17:20
sitebuilderLuc Pattyn25-May-10 17:20 
GeneralRe: One question about size of empty class... Pin
asadullah ansari25-May-10 17:38
asadullah ansari25-May-10 17:38 
AnswerRe: One question about size of empty class... Pin
«_Superman_»25-May-10 18:16
professional«_Superman_»25-May-10 18:16 
AnswerRe: One question about size of empty class... Pin
Aescleal25-May-10 19:40
Aescleal25-May-10 19:40 
AnswerRe: One question about size of empty class... Pin
KarstenK25-May-10 21:16
mveKarstenK25-May-10 21:16 

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.