Get array item based on index

后端 未结 2 916
故里飘歌
故里飘歌 2021-01-21 11:42

I am trying to get an item from a char array based on the index that I have. I have used code earlier to get the index of a specified item but now I want the opposite, to get th

2条回答
  •  日久生厌
    2021-01-21 12:18

    Assuming your char array is called ArrayOfChars and the index is i. It should be as simple as

    char arrayChar = ArrayOfChars[i];
    

提交回复
热议问题