Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to I include functions from another project? Pin
jngonzalez2-May-04 6:28
jngonzalez2-May-04 6:28 
AnswerRe: How to I include functions from another project? Pin
valikac2-May-04 14:52
valikac2-May-04 14:52 
GeneralDeveloper Studio issue Pin
brdavid2-May-04 5:10
brdavid2-May-04 5:10 
GeneralRe: Developer Studio issue Pin
Chris Losinger2-May-04 5:33
professionalChris Losinger2-May-04 5:33 
GeneralRe: Developer Studio issue Pin
Renjith Ramachandran2-May-04 5:42
Renjith Ramachandran2-May-04 5:42 
GeneralRe: Developer Studio issue Pin
John R. Shaw2-May-04 5:43
John R. Shaw2-May-04 5:43 
GeneralRe: Developer Studio issue Pin
brdavid2-May-04 6:01
brdavid2-May-04 6:01 
GeneralVariable parameters and COleVariant Pin
brdavid2-May-04 5:07
brdavid2-May-04 5:07 
I had a similar issue before and fixed up the code per instructions given to me, however I still have an issue with it. The code is as follows
<code>
CString CXMLParser::CreateAttributeTag(bool End, CString TagName, COleVariant *Value, ...)
{
	va_list argList;
	int count = 0;

	CString returnVal = _T("");

	va_start(argList, Value);
	
	for(;;)
	{
		CString AttributeName = va_arg(argList, LPCTSTR);
		//AttributeName = ConvertValueToString(&pVar); 

		if(AttributeName.IsEmpty())	break;

		CString AttributeValue = va_arg(argList, LPCTSTR);
		//CString AttributeValue = ConvertValueToString(&pVar);

		returnVal += AttributeName +"=\'"+ AttributeValue +"\' ";
	}

	va_end(argList);

	return FormatTag(End, TagName, Value, returnVal);
}
</code>

I want to provide a function that will take variable parameters so I can build an attribute list for an XML tag. This function is the function I call with the variable parameters. When var_arg is called I get corrupted data.

Another question I had was, I saw CString Format uses a LPCTSTR variable where each parameter could be a different type, that is one parameter could be an int, another a double and another a string. Since I want the same to work here, is it proper to employ the same tactic or should I use COleVariant?

Thanks!
GeneralRe: Variable parameters and COleVariant Pin
Michael Dunn2-May-04 5:57
sitebuilderMichael Dunn2-May-04 5:57 
GeneralRe: Variable parameters and COleVariant Pin
brdavid2-May-04 6:25
brdavid2-May-04 6:25 
GeneralRe: Variable parameters and COleVariant Pin
Michael Dunn2-May-04 6:34
sitebuilderMichael Dunn2-May-04 6:34 
GeneralExport stl from a dll Pin
bsargos2-May-04 5:00
bsargos2-May-04 5:00 
GeneralRe: Export stl from a dll Pin
Joaquín M López Muñoz2-May-04 11:47
Joaquín M López Muñoz2-May-04 11:47 
GeneralRe: Export stl from a dll Pin
bsargos2-May-04 20:57
bsargos2-May-04 20:57 
GeneralRe: Export stl from a dll Pin
bsargos2-May-04 21:26
bsargos2-May-04 21:26 
GeneralInvalidate() - Erasing background Pin
AJ1232-May-04 4:01
AJ1232-May-04 4:01 
GeneralSOCKETs: recv after accept Pin
chrismc9122-May-04 3:15
chrismc9122-May-04 3:15 
GeneralRe: SOCKETs: recv after accept Pin
Nitzan Shaked2-May-04 3:35
Nitzan Shaked2-May-04 3:35 
GeneralRe: SOCKETs: recv after accept &lt;- Thanks! Pin
chrismc9122-May-04 4:08
chrismc9122-May-04 4:08 
GeneralRe: SOCKETs: recv after accept Pin
Lymington2-May-04 3:55
Lymington2-May-04 3:55 
GeneralNeed C++ programmer consulting Pin
John Alderman2-May-04 2:26
John Alderman2-May-04 2:26 
GeneralRe: Need C++ programmer consulting Pin
Renjith Ramachandran2-May-04 5:46
Renjith Ramachandran2-May-04 5:46 
GeneralDeveloper Studio problem ! Pin
Still learning how to code2-May-04 1:26
Still learning how to code2-May-04 1:26 
GeneralRe: Developer Studio problem ! Pin
Still learning how to code3-May-04 0:04
Still learning how to code3-May-04 0:04 
GeneralAuto updater Pin
?!?2-May-04 0:54
?!?2-May-04 0:54 

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.