Changing a capital letter (read from cin) to lower case?

前端 未结 5 2028
独厮守ぢ
独厮守ぢ 2021-01-29 08:13

i wanna change the capital cin to lower case for the input , for example if cin>> one one=R it should be r so it convert it automatically

<
5条回答
  •  情深已故
    2021-01-29 08:32

    In header file " ctype.h" there are functions which supports case formatting

    such as : tolower(var) formats text to lower case, toupper(var) formats text to upper case

提交回复
热议问题