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

C / C++ / MFC

 
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 
Questionmatrix class Pin
b-rad31125-May-10 9:48
b-rad31125-May-10 9:48 
QuestionRe: matrix class Pin
David Crow25-May-10 9:53
David Crow25-May-10 9:53 
AnswerRe: matrix class Pin
b-rad31125-May-10 9:53
b-rad31125-May-10 9:53 
AnswerRe: matrix class Pin
Hristo-Bojilov25-May-10 10:18
Hristo-Bojilov25-May-10 10:18 
GeneralRe: matrix class Pin
b-rad31125-May-10 10:21
b-rad31125-May-10 10:21 
GeneralRe: matrix class Pin
CPallini25-May-10 10:33
mveCPallini25-May-10 10:33 
AnswerRe: matrix class Pin
Maximilien25-May-10 10:38
Maximilien25-May-10 10:38 
GeneralRe: matrix class Pin
b-rad31125-May-10 10:39
b-rad31125-May-10 10:39 

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.