Help avec Mastermind en c

isododge Messages postés 3 Date d'inscription jeudi 23 février 2006 Statut Membre Dernière intervention 8 mars 2006 - 8 mars 2006 à 11:52
SAKingdom Messages postés 3212 Date d'inscription lundi 7 novembre 2005 Statut Membre Dernière intervention 16 février 2009 - 8 mars 2006 à 23:08
bonjour,

Parceque je ne suis pas bien en français, je peux parler en anglais. Si tu ne comprends pas, je veux poser ma question en français. Puis...

I've found This program in c, on this great site: Mastermind, copyright jeromedu94. I have a problem compiling this code, although I really need it, to get the knowledge of what the program do. So I can use this knowledge for school. It's my first year in c, so I'm quite noobisch. Can someone help me please with this problem. I would be really thankfull.

the code you find here: http://www.cppfrance.com/code.aspx?ID=20785

Here's the problem:

I use Borland's CbuilderX to compile the .c en .h files into one project. But then I get error that it doenst find the codes that are in mastermind.h. I even got this .h in the include of the directory. After this error, I got the .h's all in the in .c and then compiled. I got only one error:

"File1.c": E2063 Illegal initialization in function SetCursorType at line 84

these are the lines that give me error:

CONSOLE_CURSOR_INFO CursorInfo = { cur, visible };
SetConsoleCursorInfo (STDOUT, &CursorInfo);

What can I do about this error, I tried a lot without succes, or do I need an other compiler?

Help would be appreciated,
thx

Ken

5 réponses

SAKingdom Messages postés 3212 Date d'inscription lundi 7 novembre 2005 Statut Membre Dernière intervention 16 février 2009 15
8 mars 2006 à 18:57
Bon je vais faire un petit effort pour parler en anglais. Mais a l'avenir essais de poser les questions en français. Si tu n'est vraiment pas bon traduit les avec google

Ok. Have you somewhere in your code the function SetCursorType because the section at the line 84 seems correct.
0
isododge Messages postés 3 Date d'inscription jeudi 23 février 2006 Statut Membre Dernière intervention 8 mars 2006
8 mars 2006 à 20:10
oui, ceci:

void SetCursorType( U8 cur )
{
BOOL visible = cur != NOCURSOR;
CONSOLE_CURSOR_INFO CursorInfo = { cur, visible };
SetConsoleCursorInfo (STDOUT, &CursorInfo);
}
0
SAKingdom Messages postés 3212 Date d'inscription lundi 7 novembre 2005 Statut Membre Dernière intervention 16 février 2009 15
8 mars 2006 à 22:40
Ok i see. It's cur !=. Try to remove it. You can't put that here.
0
isododge Messages postés 3 Date d'inscription jeudi 23 février 2006 Statut Membre Dernière intervention 8 mars 2006
8 mars 2006 à 22:53
hmm

j'ai edité ça en:

void SetCursorType( U8 cur )
{
BOOL visible = NOCURSOR;
/*line 84*/ CONSOLE_CURSOR_INFO CursorInfo = { cur, visible };
SetConsoleCursorInfo (STDOUT, &CursorInfo);
}

mais ca donne déjà la même error à line 84
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
SAKingdom Messages postés 3212 Date d'inscription lundi 7 novembre 2005 Statut Membre Dernière intervention 16 février 2009 15
8 mars 2006 à 23:08
Que vaut ton NOCURSOR? A tu d'autre valeur avec le nom de CursorInfo?
0
Rejoignez-nous