Click here to Skip to main content
15,912,507 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Menu Question [modified] Pin
Nibu babu thomas20-Jul-07 3:34
Nibu babu thomas20-Jul-07 3:34 
Question[Message Deleted] Pin
hari4ur20-Jul-07 0:55
hari4ur20-Jul-07 0:55 
AnswerRe: Chat Pin
Abhijeet Pathak20-Jul-07 1:29
Abhijeet Pathak20-Jul-07 1:29 
GeneralRe: Chat Pin
Perspx20-Jul-07 2:10
Perspx20-Jul-07 2:10 
AnswerRe: Chat Pin
David Crow20-Jul-07 2:54
David Crow20-Jul-07 2:54 
GeneralRe: Chat Pin
Perspx20-Jul-07 10:23
Perspx20-Jul-07 10:23 
Questionvariable number of argument in C++ Pin
pedefetoll20-Jul-07 0:41
pedefetoll20-Jul-07 0:41 
AnswerRe: variable number of argument in C++ Pin
Matthew Faithfull20-Jul-07 1:09
Matthew Faithfull20-Jul-07 1:09 
You can chain the variable arguments but only the top level function can use ... (ellipsis)
Here's a trivial example

void CMSErrorHandlingImpl::mxTrace(const mxCHAR* szFormat, ...)
{
	va_list args;
	va_start(args, szFormat);
	CErrorHandling::Trace( szFormat, args );
	va_end(args);
}

void CErrorHandling::Trace(LPCTSTR lpszFormat, va_list args)
{
	va_list theargs = args;		
		
	if( _vftprintf(stderr, lpszFormat, args) < 0 )
	{
		_ftprintf(stderr, _T("%s"), _T("Trace failure! Unable to format a Trace message\n"));		
		_ftprintf(stderr, _T("Format:- %s\n"), lpszFormat);
	}

	TCHAR traceBuffer[1024];			
			
	if( _vstprintf(traceBuffer, lpszFormat, theargs) < 0 )
	{
	}

	OutputDebugString(traceBuffer);
			
	va_end(args);
}


Nothing is exactly what it seems but everything with seems can be unpicked.

AnswerRe: variable number of argument in C++ Pin
David Crow20-Jul-07 2:57
David Crow20-Jul-07 2:57 
Questioncan i use MatchDocType() in Mainframe class Pin
mirraa20-Jul-07 0:40
mirraa20-Jul-07 0:40 
AnswerRe: can i use MatchDocType() in Mainframe class Pin
Mark Salsbery20-Jul-07 5:45
Mark Salsbery20-Jul-07 5:45 
AnswerRe: can i use MatchDocType() in Mainframe class Pin
Mark Salsbery20-Jul-07 6:09
Mark Salsbery20-Jul-07 6:09 
Questiondata fetch problem Pin
p_20-Jul-07 0:30
p_20-Jul-07 0:30 
AnswerRe: data fetch problem Pin
David Crow20-Jul-07 3:23
David Crow20-Jul-07 3:23 
QuestionHow to add elements Horizontally in ListBox Pin
Atul2320-Jul-07 0:25
Atul2320-Jul-07 0:25 
AnswerRe: How to add elements Horizontally in ListBox Pin
Nibu babu thomas20-Jul-07 1:35
Nibu babu thomas20-Jul-07 1:35 
AnswerRe: How to add elements Horizontally in ListBox Pin
Hamid_RT31-Jul-07 19:34
Hamid_RT31-Jul-07 19:34 
QuestionCArray or vector? which is better to use? Pin
jpucnpczjx19-Jul-07 23:55
jpucnpczjx19-Jul-07 23:55 
AnswerRe: CArray or vector? which is better to use? Pin
CPallini20-Jul-07 0:09
mveCPallini20-Jul-07 0:09 
AnswerRe: CArray or vector? which is better to use? Pin
Matthew Faithfull20-Jul-07 4:16
Matthew Faithfull20-Jul-07 4:16 
GeneralRe: CArray or vector? which is better to use? Pin
Cyrilix20-Jul-07 5:02
Cyrilix20-Jul-07 5:02 
GeneralRe: CArray or vector? which is better to use? Pin
Matthew Faithfull20-Jul-07 5:38
Matthew Faithfull20-Jul-07 5:38 
AnswerRe: CArray or vector? which is better to use? Pin
ThatsAlok22-Jul-07 18:47
ThatsAlok22-Jul-07 18:47 
Questionhi Pin
nitheshkumar19-Jul-07 23:24
nitheshkumar19-Jul-07 23:24 
JokeRe: hi Pin
CPallini19-Jul-07 23:29
mveCPallini19-Jul-07 23:29 

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.