This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

comparing two arrays-values

hi,

i have a xdata unsigned char* a_1[210]
and unsigned char* a_2[210]

Thea are including string value like "21:32 04:34 xyz"

how can i compare this arrays?

what i mean is something like

if (a_1[0] == a_2[0] {
// do something
}

can somebody help me?

RE

Parents
  • "Thea are including string value like "21:32 04:34 xyz"
    how can i compare this arrays?"


    The standard 'C' library provides functions like strcmp already mentioned for doing simple text comparisons.

    However, if you want to interpret these strings as times, and compare their time values (eg, "earlier than" or "later than"), you will have to write your own comparison functions.
    Hint: start with the most-significant digits...

Reply
  • "Thea are including string value like "21:32 04:34 xyz"
    how can i compare this arrays?"


    The standard 'C' library provides functions like strcmp already mentioned for doing simple text comparisons.

    However, if you want to interpret these strings as times, and compare their time values (eg, "earlier than" or "later than"), you will have to write your own comparison functions.
    Hint: start with the most-significant digits...

Children
No data