theoretically - when using unint16_t (unsigned integer of size 16) I have two arrays of these unsigned int and i am going to use

memcmp

for example:

uint16_t a[ARRAYSIZE] = {0,1,2,3,4,5,6,7,8,9,10};
uint16_t b[ARRAYSIZE] = {0,1,2,3,4,5,6,7,8,9,10};

if (memcmp(a,b , sizeof(uint16_t) * 16) == 0)
    {
        return true;
    }else
    {
        return false;
    }

My really question is do i need to use strcpy?? am i going down the correct path or is there an alternitive to using it ?

>>sizeof(uint16_t) * 16
Wrong. All that gives you is the number of bits (not bytes) in one integer. what you want is the size of one of the arrays, such as ARRAYSIZE*sizeof(uint16_t) >> do i need to use strcpy
No. strcpy() works on strings of text data, not numeric data.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.