Hi everyone
I have an operation in my programm where i have to copy parts of a pointer pointing to an array of chars into another char at another pointers address.
Declaration:
Code:
struct EXIF
{
char DateTimeOriginal[20];
char Year[4];
char Month[2];
char Day[2];
char Hour[2];
char Minute[2];
char Second[2];
...
};
The function:
Code:
for (int a = 0; a <= 3; a++)
{
pEXIF->Year[a] = pEXIF->DateTimeOriginal[a];
...
}
However this just copies the whole string into the other array but i just want the first 4 characters of pEXIF->DateTimeOriginal stored into pEXIF->Year.
I'm not that firm in pointer stuff so I hope one of you has a tip for me
greetings
ghost