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 / testint.cpp < prev    next >
C/C++ Source or Header  |  1993-01-17  |  527b  |  27 lines

  1. //testint.cpp  -- simple test routine for GetPrivateProfileInt
  2. #include "profiles.h"
  3. #include <string.h>
  4. #include <iostream.h>
  5.  
  6. void main()
  7. {
  8.     char app[81];
  9.     char key[81];
  10.     WORD val ;
  11.  
  12. //-- repeatedly test getting a specific key
  13.     for (;;)
  14.     {
  15.         cout << "Application :";
  16.         cin.get(app,sizeof(app));
  17.         cin.ignore();
  18.         cout << "Key :";
  19.         cin.get(key,sizeof(key)) ;
  20.         cin.ignore();
  21.         val = GetPrivateProfileInt
  22.         (app,key,12345,"test.ini");
  23.         cout << "val : " << val << "\n" ;
  24.     }
  25. }
  26.  
  27. //-- end of testint.cpp