I'm having a problem with using the functions strncpy and memcpy().
I'm writing a function to initialise a structure. It gets two arrays passed by array. I need to write the contents of these to the corresponding fields of the structure, which are arrays of exactly the same type and size. I didn't want to write out this assignment by hand, so I tried to use the functions strncpy() and memcpy() for this goal. But for some reason my compiler ( G++ on Ubuntu Linux 10.04 ) refuses to compile this function and gives me errors related to the calls to these functions.
Both strcpy and memcpy need source and destination addresses. field_two[0][0] and the others, however is a value. Use &field_two[0][0] or field_two[0].