We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
My problem is that I want to merge 2 arrays to 1 array but I have errors when I build the program.
void can_merge_16_32(u16_t part_a, u16_t part_b) { u32_t output = 0; u16_t i = 0; for( i = 0 ; i < 16 ; i++) { output[i] = part_a[i]; output[i+16] = part_b[i]; } return output; }
src\\can.c(187): error: subscripted value is neither array nor pointer
Your new code don't seen to relate in any way to your original post.
Another thing - your new code makes use of 16-bit and 32-but unsigned integers. But at the same time, you claim that one variable named "DegMin" needs a 32-bit unsigned while another "DegMin" can manage with just a 16-bit unsigned. That indicates that your data types or variable names aren't well selected.
Besides that - it also looks like you might possibly multiply arc minutes with 65536 (shift 16 steps left) before combinining with degrees. But arc minutes would be a smaller unit than degrees - but a larger unit than arc seconds.