Click here to Skip to main content
15,923,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionToken privlages Pin
Waldermort2-Oct-07 21:10
Waldermort2-Oct-07 21:10 
GeneralRe: Token privlages Pin
Sachinpatole3-Oct-07 0:31
Sachinpatole3-Oct-07 0:31 
Question[Clarified]what does this convention mean? Pin
chandu0042-Oct-07 21:05
chandu0042-Oct-07 21:05 
AnswerRe: what does this convention mean? Pin
Stephen Hewitt2-Oct-07 21:11
Stephen Hewitt2-Oct-07 21:11 
GeneralRe: what does this convention mean? Pin
chandu0042-Oct-07 21:15
chandu0042-Oct-07 21:15 
GeneralRe: what does this convention mean? Pin
Stephen Hewitt2-Oct-07 21:19
Stephen Hewitt2-Oct-07 21:19 
General[Clarified] Thanks Pin
chandu0042-Oct-07 21:26
chandu0042-Oct-07 21:26 
GeneralRe: [Clarified] Thanks Pin
DQNOK3-Oct-07 3:52
professionalDQNOK3-Oct-07 3:52 
Microsoft has forgotten to include the standard va_copy() function/macro. See http://www.codeproject.com/script/comments/forums.asp?forumid=1647&mpp=50&select=2255221&df=100&fr=51[^]

va_copy() is required in a function like vprintf (which is probably how printf is actually implemented on most systems:
int printf( const char* format, ... )
{
   int ret;
   va_list args;
   va_start( args, format );
   ret = vprintf( format, args );
   va_end( args );
   return ret;
}

)
but unlike vprintf, you need to traverse the va_list more than once. There is no portable way to restart the argument traversal process without the va_copy() macro.

In my program, I went ahead and wrote:
#include <stdarg.h>
#ifndef va_copy
// This is exasperation driven because Visual Studio doesn't have it.  
// IT MAY NOT ALWAYS WORK (although it is working in testing).
#  define va_copy(dest,src) ((dest)=(src))
#endif

This may be confusing to a newbie to the subject, but if you program long enough, and you try to factor your code correctly, you're going to run into this situation.

David
QuestionTooltip popup time Pin
Nishad S2-Oct-07 20:45
Nishad S2-Oct-07 20:45 
AnswerRe: Tooltip popup time Pin
Russell'2-Oct-07 21:50
Russell'2-Oct-07 21:50 
GeneralRe: Tooltip popup time Pin
Nishad S2-Oct-07 22:42
Nishad S2-Oct-07 22:42 
GeneralRe: Tooltip popup time Pin
Russell'2-Oct-07 22:54
Russell'2-Oct-07 22:54 
GeneralRe: Tooltip popup time Pin
Nishad S2-Oct-07 23:40
Nishad S2-Oct-07 23:40 
GeneralRe: Tooltip popup time Pin
Russell'3-Oct-07 1:37
Russell'3-Oct-07 1:37 
GeneralRe: Tooltip popup time Pin
Nishad S3-Oct-07 1:41
Nishad S3-Oct-07 1:41 
GeneralRe: Tooltip popup time Pin
Russell'3-Oct-07 2:10
Russell'3-Oct-07 2:10 
GeneralRe: Tooltip popup time Pin
Roger Broomfield2-Oct-07 23:45
Roger Broomfield2-Oct-07 23:45 
QuestionErasing a button Pin
DanYELL2-Oct-07 13:19
DanYELL2-Oct-07 13:19 
QuestionRe: Erasing a button Pin
Mark Salsbery2-Oct-07 13:29
Mark Salsbery2-Oct-07 13:29 
AnswerRe: Erasing a button Pin
DanYELL2-Oct-07 13:38
DanYELL2-Oct-07 13:38 
GeneralRe: Erasing a button Pin
Mark Salsbery2-Oct-07 13:44
Mark Salsbery2-Oct-07 13:44 
GeneralRe: Erasing a button Pin
Mark Salsbery2-Oct-07 13:58
Mark Salsbery2-Oct-07 13:58 
GeneralRe: Erasing a button Pin
cp98762-Oct-07 16:42
cp98762-Oct-07 16:42 
Questionfunction pointers part 2 Pin
Mustafa Ismail Mustafa2-Oct-07 10:59
Mustafa Ismail Mustafa2-Oct-07 10:59 
AnswerRe: function pointers part 2 Pin
Chris Losinger2-Oct-07 11:15
professionalChris Losinger2-Oct-07 11:15 

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.