本文介绍了如何在Xml中存储Vc ++输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用vc ++获取系统信息..我想将输出存储在xml文件中。我该怎么办?我在下面包含了我的VC ++代码。我应该包含哪个xml库/头文件/命名空间来实现它?



谢谢,



问候



I am fetching system information with vc++.. I want to store my output in xml file. How should I do it? I have included my VC++ code below. Which xml library/headerfile/namespace should I include to achieve it ?

Thanks,

Regards

#include "stdafx.h"
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <iostream>


public class TEST2
{
public:
void WindowsVersion()
{
 DWORD dwWinVer;
 dwWinVer = GetVersion();


 _tprintf ( _T("Windows version: %d.%d.%d"),
            LOBYTE(LOWORD(dwWinVer)), HIBYTE(LOWORD(dwWinVer)),  // LoWord
            HIWORD(dwWinVer));

}
void processinfo()
{
        SYSTEM_INFO sysInfo;
    GetSystemInfo(&sysInfo);
_tprintf( _T("\n Number of processs is running on %d"),
sysInfo.dwNumberOfProcessors);//process ketli chale che

}};
int main()
{

TEST2 t2;

t2.WindowsVersion();
t2.processinfo();


  system("pause");
   return 0;

}

推荐答案




这篇关于如何在Xml中存储Vc ++输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 07:21