Foreach loop in C++ equivalent of C#

前端 未结 11 1753
礼貌的吻别
礼貌的吻别 2020-12-13 01:20

How would I convert this code to C++?

string[] strarr = {\"ram\",\"mohan\",\"sita\"};    
foreach(string str in strarr) {
  listbox.items.add(str);
}
         


        
11条回答
  •  再見小時候
    2020-12-13 02:17

    If you have an array you can simply use a for loop. (I'm sorry, but I'm not going to type out the code for a for loop for you.)

提交回复
热议问题