How would I convert this code to C++?
string[] strarr = {\"ram\",\"mohan\",\"sita\"}; foreach(string str in strarr) { listbox.items.add(str); }
Something like:
const char* strarr = {"ram","mohan","sita", 0L}; for(int i = 0; strarr[i]; ++i) { listbox.items.add(strarr[i]); }
Also works for standard C. Not sure in C++ how to detect the end of the strarr without having a null element, but the above should work.