Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Stuck up with NULL character Pin
Member 75496021-Feb-08 4:54
Member 75496021-Feb-08 4:54 
GeneralRe: Stuck up with NULL character Pin
David Crow21-Feb-08 6:36
David Crow21-Feb-08 6:36 
GeneralRe: Stuck up with NULL character Pin
Member 75496021-Feb-08 7:34
Member 75496021-Feb-08 7:34 
GeneralRe: Stuck up with NULL character Pin
James R. Twine21-Feb-08 8:29
James R. Twine21-Feb-08 8:29 
GeneralRe: Stuck up with NULL character Pin
Member 75496021-Feb-08 8:53
Member 75496021-Feb-08 8:53 
GeneralRe: Stuck up with NULL character Pin
Ali Rafiee21-Feb-08 9:53
Ali Rafiee21-Feb-08 9:53 
GeneralRe: Stuck up with NULL character Pin
abhijitr21-Feb-08 23:12
abhijitr21-Feb-08 23:12 
AnswerRe: Stuck up with NULL character Pin
abhijitr22-Feb-08 3:30
abhijitr22-Feb-08 3:30 
Hi Guys,
I have finally solved the problem.

If you check the size of class A it comes to be 8 (with virtual destructor) which we were expecting it to be 06 as we have used 2 bytes for ‘stre’ and 4 bytes for virtual pointer
(as we have declared virtual destructor in class A).

On investigation I found that size is 8 due to word alignment of structure and union members which is used to increase the performance.
Due to this we are getting room for extra two characters which accommodates our null character and saves us from crashing.

Thanks for your cooperation.
GeneralRe: Stuck up with NULL character Pin
Ali Rafiee22-Feb-08 5:10
Ali Rafiee22-Feb-08 5:10 
GeneralRe: Stuck up with NULL character Pin
abhijitr27-Feb-08 21:35
abhijitr27-Feb-08 21:35 
GeneralAbout polymorphism.. Pin
rowdy_vc++20-Feb-08 23:22
rowdy_vc++20-Feb-08 23:22 
GeneralRe: About polymorphism.. [modified] PinPopular
CPallini20-Feb-08 23:47
mveCPallini20-Feb-08 23:47 
GeneralRe: About polymorphism.. Pin
Rajkumar R21-Feb-08 0:03
Rajkumar R21-Feb-08 0:03 
GeneralRe: About polymorphism.. Pin
rowdy_vc++21-Feb-08 0:47
rowdy_vc++21-Feb-08 0:47 
GeneralRe: About polymorphism.. Pin
Rajkumar R21-Feb-08 1:02
Rajkumar R21-Feb-08 1:02 
GeneralRe: About polymorphism.. Pin
David Crow21-Feb-08 4:03
David Crow21-Feb-08 4:03 
Questionconvert color image to grayscale image ? Pin
gentleguy20-Feb-08 21:29
gentleguy20-Feb-08 21:29 
AnswerRe: convert color image to grayscale image ? Pin
Iain Clarke, Warrior Programmer20-Feb-08 22:06
Iain Clarke, Warrior Programmer20-Feb-08 22:06 
AnswerRe: convert color image to grayscale image ? Pin
CPallini20-Feb-08 22:16
mveCPallini20-Feb-08 22:16 
GeneralRe: convert color image to grayscale image ? Pin
Rajkumar R20-Feb-08 22:55
Rajkumar R20-Feb-08 22:55 
GeneralRe: convert color image to grayscale image ? Pin
CPallini20-Feb-08 23:22
mveCPallini20-Feb-08 23:22 
GeneralRe: convert color image to grayscale image ? [modified] Pin
Rajkumar R20-Feb-08 23:33
Rajkumar R20-Feb-08 23:33 
GeneralRe: convert color image to grayscale image ? Pin
CPallini21-Feb-08 0:02
mveCPallini21-Feb-08 0:02 
GeneralRe: convert color image to grayscale image ? Pin
Rajkumar R21-Feb-08 0:14
Rajkumar R21-Feb-08 0:14 
GeneralRe: convert color image to grayscale image ? Pin
gentleguy21-Feb-08 0:32
gentleguy21-Feb-08 0:32 

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.