????????????????????????cpp???????????????????????
??????????????????????????????????????????????????????????????????
???????????????£????????????????????
??????????????????cppд?????????????????????
?????????????????????????????????????д???????汾??
???????????????????~
??????????汾????????c??cpp??java????????
1 /*
2  * Author: Haipz
3  * School: HDU
4  * File Name: registry1.0.cpp
5  */
6 #include <cstdio>
7 #include <cmath>
8 #include <ctime>
9 #include <cctype>
10 #include <cstring>
11 #include <cstdlib>
12 #include <climits>
13 #include <cfloat>
14 #include <iostream>
15 #include <vector>
16 #include <stack>
17 #include <queue>
18 #include <set>
19 #include <map>
20 #include <algorithm>
21 using namespace std;
22
23 char s[1024]?? buffer[128]?? result[1024*4];
24
25 void work_1() {
26     system("reg add "HKEY_CLASSES_ROOT\.c\ShellNew" /v "NullFile" /t REG_SZ");
27 }
28
29 void work_2() {
30     system("reg add "HKEY_CLASSES_ROOT\.cpp\ShellNew" /v "NullFile" /t REG_SZ");
31 }
32
33 void work_3() {
34     system("reg add "HKEY_CLASSES_ROOT\.java\ShellNew" /v "NullFile" /t REG_SZ");
35 }
36
37 int main() {
38     printf("Add registry for C?? C++ and Java ");
39     printf("Author: Haipz School: HDU ");
40     printf("1 for C; 2 for C++; 3 for Java. ");
41     printf("Example: 12 to add C and C++. ");
42     printf("Please make choice(s): ");
43     gets(s);
44     for (int i = 0; s[i] != '