paip.c++读写ini文件.
paip.c++读写ini文件.
作者Attilax , EMAIL:1466519819@qq.com
来源:attilax的专栏
地址:http://blog.csdn.net/attilax
#include <string.h>
#include <iostream>
#include <Windows.h>
#include <tchar.h>
#include <QtCore>
#include <QDebug>
using namespace std;
#define UNICODE
#include "qdebughidec9.cpp"
/**
* @brief main
* @param argv
* @param argc
* @return
*/
int main(int argv,char **argc)
{
//随时随地为我们服务的全局对象myout
PrintAti<<"ttttt------";
//const char[]
// qDebugHideC9 n=new qDebugHideC9("aa");
LPCWSTR str=L"c:\\FileName.ini";
qDebug()<<"----ret: "<<str;
WritePrivateProfileString(L"SegmentOne",L"Sex", L"Man", str );
/*
*[SegmentOne]
Sex=Man
*/
/*QString ret = QString::fromWCharArray(path);
qDebug()<<"----ret: "<<ret;*/
//QString ret = QString::from(path);
//qDebug()<<"----ret: "<<ret;
// delete [] lpPath;
printf("---end---");
cout<<"";
return 0;
}
-----------------------
[SegmentOne]
Sex=Man
作者Attilax , EMAIL:1466519819@qq.com
来源:attilax的专栏
地址:http://blog.csdn.net/attilax
#include <string.h>
#include <iostream>
#include <Windows.h>
#include <tchar.h>
#include <QtCore>
#include <QDebug>
using namespace std;
#define UNICODE
#include "qdebughidec9.cpp"
/**
* @brief main
* @param argv
* @param argc
* @return
*/
int main(int argv,char **argc)
{
//随时随地为我们服务的全局对象myout
PrintAti<<"ttttt------";
//const char[]
// qDebugHideC9 n=new qDebugHideC9("aa");
LPCWSTR str=L"c:\\FileName.ini";
qDebug()<<"----ret: "<<str;
WritePrivateProfileString(L"SegmentOne",L"Sex", L"Man", str );
/*
*[SegmentOne]
Sex=Man
*/
/*QString ret = QString::fromWCharArray(path);
qDebug()<<"----ret: "<<ret;*/
//QString ret = QString::from(path);
//qDebug()<<"----ret: "<<ret;
// delete [] lpPath;
printf("---end---");
cout<<"";
return 0;
}
-----------------------
[SegmentOne]
Sex=Man