Click here to Skip to main content
16,011,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tricky Dialog... Pin
James R. Twine15-Mar-01 5:33
James R. Twine15-Mar-01 5:33 
GeneralRe: Tricky Dialog... Pin
James R. Twine15-Mar-01 5:34
James R. Twine15-Mar-01 5:34 
GeneralRe: Tricky Dialog... Pin
James R. Twine15-Mar-01 5:34
James R. Twine15-Mar-01 5:34 
GeneralBuy graphic card ... Pin
Hadi Rezaee14-Mar-01 20:37
Hadi Rezaee14-Mar-01 20:37 
GeneralRe: Buy graphic card ... Pin
Christian Graus14-Mar-01 22:36
protectorChristian Graus14-Mar-01 22:36 
GeneralClass example ... Pin
Hadi Rezaee14-Mar-01 20:36
Hadi Rezaee14-Mar-01 20:36 
GeneralRe: Class example ... Pin
Christian Graus14-Mar-01 22:28
protectorChristian Graus14-Mar-01 22:28 
GeneralRe: Class example ... Pin
Erik Funkenbusch15-Mar-01 11:44
Erik Funkenbusch15-Mar-01 11:44 
On thing to watch out for in your string replacement class is variadic parameters.

There is no type to a variadic parameter (...), so it doesn't cause the conversion operator to be called (operator const char*()), so if you pass your CString replacement to a function like printf, it will instead blindly try to treat your class like whatever type you specified.

This isn't a problem for CString, because CString's first data member is the actual internal char *, but for you, the first member will actually be the vtable of your virtual destructor, causing the printf to produce garbage.

GeneralRe: Class example ... Pin
Christian Graus15-Mar-01 11:58
protectorChristian Graus15-Mar-01 11:58 
GeneralRe: Class example ... Pin
Erik Funkenbusch16-Mar-01 22:04
Erik Funkenbusch16-Mar-01 22:04 
GeneralCFile and CArchive ... Pin
Hadi Rezaee14-Mar-01 20:35
Hadi Rezaee14-Mar-01 20:35 
GeneralRe: CFile and CArchive ... Pin
Erik Funkenbusch15-Mar-01 11:45
Erik Funkenbusch15-Mar-01 11:45 
GeneralRules ... Pin
Hadi Rezaee14-Mar-01 20:34
Hadi Rezaee14-Mar-01 20:34 
GeneralRe: Rules ... Pin
Christian Graus14-Mar-01 22:15
protectorChristian Graus14-Mar-01 22:15 
GeneralAllocate memory ... Pin
Hadi Rezaee14-Mar-01 20:33
Hadi Rezaee14-Mar-01 20:33 
GeneralRe: Allocate memory ... Pin
Christian Graus14-Mar-01 22:31
protectorChristian Graus14-Mar-01 22:31 
GeneralRe: Allocate memory ... Pin
Hadi Rezaee16-Mar-01 19:28
Hadi Rezaee16-Mar-01 19:28 
GeneralChange color problem ... Pin
Hadi Rezaee14-Mar-01 20:29
Hadi Rezaee14-Mar-01 20:29 
GeneralRe: Change color problem ... Pin
Christian Graus14-Mar-01 22:20
protectorChristian Graus14-Mar-01 22:20 
GeneralSome questions about STL ... Pin
Hadi Rezaee14-Mar-01 20:28
Hadi Rezaee14-Mar-01 20:28 
GeneralRe: Some questions about STL ... Pin
Erik Funkenbusch15-Mar-01 11:50
Erik Funkenbusch15-Mar-01 11:50 
GeneralGetting information from a database... Pin
14-Mar-01 17:36
suss14-Mar-01 17:36 
GeneralRe: Getting information from a database... Pin
15-Mar-01 4:45
suss15-Mar-01 4:45 
GeneralObtaining Process info Pin
14-Mar-01 16:45
suss14-Mar-01 16:45 
GeneralRe: Obtaining Process info Pin
James R. Twine15-Mar-01 5:28
James R. Twine15-Mar-01 5:28 

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.