home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_08
/
hellquis
/
testwri.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-24
|
740b
|
33 lines
//testwri.cpp -- simple test routine for WritePrivateProfileString
#include "profiles.h"
#include <string.h>
#include <iostream.h>
void main()
{
char app[81];
char key[81];
char string[81];
int no ;
//-- part one , test getting all keys for an application
cout << "This test uses file test.ini\n";
//-- part two, repeatedly test getting a specific key
for (;;)
{
cout << "Application :";
cin.get(app,sizeof(app));
cin.ignore();
cout << "Key :";
cin.get(key,sizeof(key)) ;
cin.ignore();
cout << "String :";
cin.get(string,sizeof(string)) ;
cin.ignore();
no = WritePrivateProfileString
(app,key,string,"test.ini");
cout << "no : " << no << "\n" ;
}
}
//-- end of testwri.cpp