B
Bleakcabal
Keep in mind my program is written in C ( not C++ ).
I have a function which takes two structs as parameters is supposed to
put the values of the source struct in the destination struct. Only
the first character is put into the destination struct for each field.
void AssignValues(info *source, info *destination)
{
*destination->name = *source->name;
*destination->class = *source->class;
*destination->alignment = *source->alignment;
}
Name, class and alignment are defined as
char variableName[20];
In a struct called info.
If my source is : test, TEST example
The destination is : t, T, e
Why is that ?
Thanks for your help.
I have a function which takes two structs as parameters is supposed to
put the values of the source struct in the destination struct. Only
the first character is put into the destination struct for each field.
void AssignValues(info *source, info *destination)
{
*destination->name = *source->name;
*destination->class = *source->class;
*destination->alignment = *source->alignment;
}
Name, class and alignment are defined as
char variableName[20];
In a struct called info.
If my source is : test, TEST example
The destination is : t, T, e
Why is that ?
Thanks for your help.