Chenillard sur Systems externe
Bonjours a tous.
dans le cadre de mon bts IRIS je doit faire un programme qui géré une carte ( Vellman)
J'ai un souci quand je compile le debug me dit qu'il attend un retour
Pour commence j'ai fait une class
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| class CarteVellman
{
public :
unsigned long ConnectionCarte(int);
};
//----- Definition des fonctions membres -------
unsigned long CarteVellman::ConnectionCarte(int CardAddress)
{
OpenDevice(CardAddress);// Fonction donnée dans le .h fournie avec la carte
return ; // c'est ici que j'ai mon souci je ne voie pas trop a quelle valeur retourner
} |
Puis mon bouton Connection
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| CarteVellman a;
char texte[20];
int CardAddr = 3 - (int(SK5->Checked) + int(SK6->Checked) * 2);
unsigned long numCarteConnectee=a.ConnectionCarte(CardAddr);
switch (numCarteConnectee)
{
case 0 :
case 1 :
case 2 :
case 3 :
sprintf (texte, " Carte %u connctée" ,CardAddr);
LEtatConnexion->Caption = texte;
LEtatConnexion->Caption = "Carte " + IntToStr(CardAddr) + " connectée";
LEtatConnexion->Font->Color = clGreen;
break;
case -1 :
LEtatConnexion->Caption = "Carte " + IntToStr(CardAddr) + " introuvable";
LEtatConnexion->Font->Color=clRed;
} |
Merci de vos réponses