What is wrong with below code

后端 未结 3 1658
遇见更好的自我
遇见更好的自我 2021-01-22 16:38

The code was suppose to rotate a one-dimensional vector of n elements left by i position. for instance, with n=8 and i = 3, the vector abcdefgh is rotated to defghabc.

T

3条回答
  •  醉话见心
    2021-01-22 17:23

    If you want to use a string to manipulate on, use a real character array rather than a character pointer.

        char string[] = "abcdefghijk";
    

提交回复
热议问题