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

function for LUT search

Hi,

I am interested in implementing a lookup table in code segment as below.

LUT[] = {
{0x01020304, "String1"},
{0x05060708, "String2"},
{0x0b0c0d0e, "String3"},
{0x22334455, "String4"}
};

How can I write a function such that if i pass the first 4-bytes data then it returns back the corresponding String from the lookup table?

Any help would be great.

Azra

0