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
| #include <stdlib.h>
#include <iostream.h>
#include <stdio.h>
#include <windows.h>
using namespace std;
void main()
{
int system(const char *string);
int num;
char name[1000];
char file[]="C:\\rep\\filchier.exe";
system("CLS");
cout << " Entrer le numero gagnant: ";
cin >> num;
printf(" Entrer le nom du gagnant: ");
cin >> name;
system("start %file %num %name");
/* SHELLEXECUTEINFO ExecuteInfo;
memset(&ExecuteInfo, 0, sizeof(ExecuteInfo));
ExecuteInfo.cbSize = sizeof(ExecuteInfo);
ExecuteInfo.fMask = 0;
ExecuteInfo.hwnd = 0;
ExecuteInfo.lpVerb = "open";
ExecuteInfo.lpFile = file;
ExecuteInfo.lpParameters = name;
ExecuteInfo.lpDirectory = 0;
ExecuteInfo.nShow = SW_SHOW;
ExecuteInfo.hInstApp = 0;
if(ShellExecuteEx(&ExecuteInfo) == FALSE)
{
cout << "Erreur de lancement du fichier : "<< file << "\n";;
}else cout << "Lancement OK " << "\n"; */
system("PAUSE");
} |
Partager