Probleme de passage de parametres a une procedure
Bonsoir
Je cherche a traduire un code Delphi sans succes
le code Delphi
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
// appel de la fonction
DefFonte(C.Font, 'Times New Roman', 24, []);
// la fonction a executer
procedure DefFonte(F: TFont; Nom: string; Taille: integer; Styl: TFontStyles);
begin
with F do begin
Name := Nom;
Size := Taille;
Style := Styl;
end;
end; |
Voici ce que j'ai ecrit
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
// appel de la fonction
DefFonte(Printer()->Canvas->Font, "Times New Roman", 24, []);
// la fonction a executer
void __fastcall TForm1::DefFonte(TFont F, String Nom, int Taille, TFontStyles Styl)
{
Font->Name = Nom;
Font->Size = Taille;
Font->Style = Styl;
}
// declaration dans le .h
void __fastcall TForm1::DefFonte(TFont F, String Nom, int Taille, TFontStyles Styl); |
Le message d'erreur recu a la compilation
Citation:
[C++ Error] Unit1.cpp(78): E2188 Expression syntax
Je n'arrive pas a solutionner ce probleme :?