1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#include<stdio.h>
#include <stdlib.h>
#include <string.h>
void convertion(char* pt_X);
int res;
int main (void)
{
char *pt_X=(char*)malloc(15*sizeof(char*));
char *pt_nom1=(char*)malloc(15*sizeof(char*));
printf("quelle est votre nom:\n");
gets(pt_nom1);
pt_X=pt_nom1;
convertion( pt_X);
free(pt_nom1);
free(pt_X);
getch();
}
void convertion(char* pt_X)
{
int i=0;
//printf("coucou");
for(i=0;*(pt_X+i)!='\0';i++)
{
res='*(pt_X+i)';
printf("a:%d",res);
}
} |
Partager