Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
776 B

  1. // make_countries.cpp : Defines the entry point for the console application.
  2. //
  3. #include "stdafx.h"
  4. #include <iostream.h>
  5. #include <fstream.h>
  6. #include <stdio.h>
  7. int __cdecl main(int argc, char* argv[])
  8. {
  9. ifstream in("countries.txt");
  10. ofstream out("countries.rc");
  11. char inbuf[256], outbuf[256];
  12. int idx = 0;
  13. out << "STRINGTABLE DISCARDABLE" << endl;
  14. out << "BEGIN" << endl;
  15. while (in)
  16. {
  17. in.getline(inbuf, 256);
  18. if (idx == 0)
  19. {
  20. sprintf(outbuf, "\tIDS_COUNTRIES_FIRST\t\t\"%s\"", inbuf);
  21. }
  22. else
  23. {
  24. sprintf(outbuf, "\tIDS_COUNTRIES_FIRST+%d\t\t\"%s\"", idx, inbuf);
  25. }
  26. out << outbuf << endl;
  27. idx++;
  28. }
  29. out << "END" << endl;
  30. return 0;
  31. }