Leptis
- Messages postés
-
17
- Date d'inscription
- mardi 27 septembre 2005
- Statut
- Membre
- Dernière intervention
- 26 juillet 2007
C ob j'ai enfin touvé la solution grace a vous tous merci
voila le code final
#include <string.h>
#include
#include <windows.h>
#include <fstream.h>
#include <stdlib.h>
using namespace std;
void tapagClavier(int var2)
{
keybd_event(var2,0x20,0,0);
keybd_event(var2,0x20,KEYEVENTF_KEYUP,0);
Sleep(1);
return;
}
int main()
{
int a =0;
int frekenc = 500;
string slt;
ifstream fichier;
fichier.open("C:\\dico.txt");
do
{
a++;
frekenc++;
_beep(frekenc,100);
}while (a<100);
while(fichier >> slt)
{
cout << slt <<"\n";
int tailleDuTruc = slt.length();
for(int b=0;b!=tailleDuTruc;b++)
{
string letre = slt.substr(b,1);
char var = letre[0];
int var2 = var;
cout << var2 << " sa marche\n";
tapagClavier(var2);
}
system("pause");
}
fichier.close();
}