PERSONNE NE SAIT IMPRIMER EN LANGAGE C.

Fermé
archange - 26 juin 2001 à 09:29
jisisv Messages postés 3645 Date d'inscription dimanche 18 mars 2001 Statut Modérateur Dernière intervention 15 janvier 2017 - 27 juin 2001 à 06:07
qu elle est la foonction pour imprimer en c

1 réponse

jisisv Messages postés 3645 Date d'inscription dimanche 18 mars 2001 Statut Modérateur Dernière intervention 15 janvier 2017 946
27 juin 2001 à 06:07
Une solution, pas la eilleure, sous Unix:

#include <stdio.h>
int main() {
/*
m1324 is the name of the printer
*/
FILE *macommande = popen("lpr -P m1324" , "w");
if (macommande) {
fprintf(macommande, "Une chaine %s , un caractère %c\n" , "Hello World", 65);
}
}
Johan
0