O
Olaf \El Blanco\
For example...
typedef struct {
int valid;
char name[MAX_NAME];
char lastname[MAX_LASTNAME];
int age;
float note;
char DNI[MAX_DNI];
} TPupil;
TPupil *Ram;
printf ("%10s, %10s %16d %15.2f %15s\n", *Ram->lastname, *Ram->name,
Ram->age, Ram->note, *Ram->DNI);
Why "Ram->age" and "Ram->note" don't need the '*' ?
And, How can I make each follow lines shorter?
(*(Ram + cant - 1)).valid = temp.valid;
(*(Ram + cant - 1)).age = temp.age;
(*(Ram + cant - 1)).note = temp.note;
strcpy( (*(Ram + cant - 1)).DNI, temp.DNI);
strcpy( (*(Ram + cant - 1)).name, temp.name);
strcpy( (*(Ram + cant - 1)).lastname, temp.lastname);
typedef struct {
int valid;
char name[MAX_NAME];
char lastname[MAX_LASTNAME];
int age;
float note;
char DNI[MAX_DNI];
} TPupil;
TPupil *Ram;
printf ("%10s, %10s %16d %15.2f %15s\n", *Ram->lastname, *Ram->name,
Ram->age, Ram->note, *Ram->DNI);
Why "Ram->age" and "Ram->note" don't need the '*' ?
And, How can I make each follow lines shorter?
(*(Ram + cant - 1)).valid = temp.valid;
(*(Ram + cant - 1)).age = temp.age;
(*(Ram + cant - 1)).note = temp.note;
strcpy( (*(Ram + cant - 1)).DNI, temp.DNI);
strcpy( (*(Ram + cant - 1)).name, temp.name);
strcpy( (*(Ram + cant - 1)).lastname, temp.lastname);