converting c code to c++, the foreach statement
So I need to make use of a library which is written in C and I'm having a little trouble integrating it with c++. Anyhow the code makes use of a foreach statement but it seems to not get along with c++ that well, I've found numerous different pages explaining how to use the foreach in c++, unfortunately none of them work. Anyhow this is what theirs is looking like, this is c code mind you:
My code looks the same, which is probably a problem as mine is c++. I get 2 different errors and I can't deduce what is causing each, an "error: FOREACHvertex not defined in this scope" and "error: vertex not defined in this scope". So if someone could explain the foreach I guess that would help loads, or point me to a page that gives the correct explanation. I'm using g++ and I have a premonition that the syntax might be slightly affected by compiler.
do some more stuff; blah blah blah