Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: separating decimal part Pin
rp_suman11-Feb-08 19:27
rp_suman11-Feb-08 19:27 
GeneralRe: separating decimal part Pin
cp987611-Feb-08 21:20
cp987611-Feb-08 21:20 
GeneralRe: separating decimal part Pin
ShilpiP11-Feb-08 21:49
ShilpiP11-Feb-08 21:49 
GeneralRe: separating decimal part Pin
rp_suman12-Feb-08 0:37
rp_suman12-Feb-08 0:37 
GeneralVisual Studio Environmental Variables Pin
ForNow11-Feb-08 16:41
ForNow11-Feb-08 16:41 
GeneralRe: Visual Studio Environmental Variables Pin
rowdy_vc++11-Feb-08 17:33
rowdy_vc++11-Feb-08 17:33 
GeneralRe: Visual Studio Environmental Variables Pin
ForNow11-Feb-08 17:57
ForNow11-Feb-08 17:57 
GeneralWrite int values in XML format Pin
CodingLover11-Feb-08 15:49
CodingLover11-Feb-08 15:49 
Hi all,

I want to write some data in XML format. Actually not to a XML file, just as XML stream. So, I've added some attributes as follows.

pWriter->WriteAttributeString(NULL, L"CharacterCount", NULL, L"5");


As you can see the last argument is a string. But I want to add a int value there, which is calculated from a data map.
I tried as follows.

int char_count = dataMap->first;
pWriter->WriteAttributeString(NULL, L"CharacterCount", NULL, char_count);


but it gives a compile error.

error C2664: 'IXmlWriter::WriteAttributeString' : cannot convert parameter 4 from 'int' to 
'LPCWSTR' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast 
or function-style cast


How can I do this conversion.

I appreciate your help all the time...
Eranga Smile | :)

GeneralRe: Write int values in XML format Pin
Chris Losinger11-Feb-08 15:51
professionalChris Losinger11-Feb-08 15:51 
GeneralRe: Write int values in XML format Pin
CodingLover11-Feb-08 16:17
CodingLover11-Feb-08 16:17 
GeneralRe: Write int values in XML format Pin
Chris Losinger11-Feb-08 16:20
professionalChris Losinger11-Feb-08 16:20 
GeneralRe: Write int values in XML format Pin
Stephen Hewitt11-Feb-08 16:27
Stephen Hewitt11-Feb-08 16:27 
GeneralRe: Write int values in XML format Pin
Mark Salsbery12-Feb-08 6:02
Mark Salsbery12-Feb-08 6:02 
GeneralCommand Line Arguments of other processes Pin
Imtiaz Murtaza11-Feb-08 15:31
Imtiaz Murtaza11-Feb-08 15:31 
QuestionHow to copy vector? Pin
TooShy2Talk11-Feb-08 15:03
TooShy2Talk11-Feb-08 15:03 
GeneralRe: How to copy vector? Pin
Maximilien11-Feb-08 15:10
Maximilien11-Feb-08 15:10 
GeneralRe: How to copy vector? Pin
Chris Losinger11-Feb-08 15:40
professionalChris Losinger11-Feb-08 15:40 
GeneralRe: How to copy vector? Pin
Stephen Hewitt11-Feb-08 16:25
Stephen Hewitt11-Feb-08 16:25 
GeneralRe: How to copy vector? Pin
Chris Losinger12-Feb-08 1:05
professionalChris Losinger12-Feb-08 1:05 
GeneralRe: How to copy vector? Pin
Stephen Hewitt11-Feb-08 16:23
Stephen Hewitt11-Feb-08 16:23 
AnswerRe: How to copy vector? Pin
Programm3r11-Feb-08 19:35
Programm3r11-Feb-08 19:35 
Question[Message Deleted] Pin
1dayprogrammer11-Feb-08 13:45
1dayprogrammer11-Feb-08 13:45 
GeneralRe: colour transition Pin
Stephen Hewitt11-Feb-08 13:54
Stephen Hewitt11-Feb-08 13:54 
GeneralRe: colour transition Pin
Californian212-Feb-08 6:32
Californian212-Feb-08 6:32 
QuestionWhat is this called? Pin
Waldermort11-Feb-08 9:03
Waldermort11-Feb-08 9:03 

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.