How to use memcmp??

I have a vector has 10 structs called "st".

Also, i created a st var named "myst" and it has many elements.

(vector<st> myst)

And to compare things, i made like this function.

(definitely, both has same elements, i mean same size)

bool comp(const st *par)
int ret = memcmp(myst, par, sizeof(par));

it occurs an error saying
"casting error. cant convert std::vector<_Ty> to st *"

how can i work it out??


I got it.
Topic archived. No new replies allowed.