i have this info[35] can conntain 35 bytes, but now i only wan to extract the last 5 bytes and push it into DB, is this stmt correct?
start from byte ->30, and read only 5 byte.
memcpy() expects an address for the first and second arguments. Try this:
Code:
memcpy( dorgnins_db.info, info + 30, 5 );
On a another note, the info array contains 35 elements. This means the first element is number zero (info[0]), and the last element is 34 (info[34]). If you wanted to access the 30th element of the array using a subscript, you would reference it as info[29].
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.