-
Notifications
You must be signed in to change notification settings - Fork 0
/
autocompC.c
44 lines (35 loc) · 867 Bytes
/
autocompC.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <winuser.h>
#include <conio.h>
short run=0;
void main(){
system("color 2");
FILE *commande;
commande=fopen("commande.cmd","w+");
char path[255];
char filec[215];
char fileexe[215];
fputs("cd ",commande);
printf("path:\n");
fgets(path,255,stdin);
fputs(path,commande);
fputs("\ngcc ",commande);
printf("file .c:\n");
scanf("%s",filec);
fputs(filec,commande);
fputs(" -o ",commande);
printf("file .exe:\n");
scanf("%s",fileexe);
fputs(fileexe,commande);
fputs("\nIF NOT ERRORLEVEL 1 EXIT ",commande);
fclose(commande);
while(run==0)
{
if(GetAsyncKeyState(VK_F7)!=FALSE){
system("start commande.cmd");
Sleep(1000);
}
}
}