Hi all,
I am new to C++.Any help would be appreciated.
I have the following code:
int myArray[20];
string str= "1,2,3,8,10,12";
I would like to assign str to myArray in that a way that the result will be as follow:
myArray[0] = 1
myArray[1] = 2
myArray[2] = 3
myArray[3] = 8
myArray[4] = 10
myArray[5] = 12
May I know how to do that?I have try many times but unable to get the desired result. Thank you.