How to convert an int to string in C?

后端 未结 10 2142
南方客
南方客 2020-11-22 02:51

How do you convert an int (integer) to a string? I\'m trying to make a function that converts the data of a struct into a string to save it in a fi

10条回答
  •  一个人的身影
    2020-11-22 03:33

    If you want to output your structure into a file there is no need to convert any value beforehand. You can just use the printf format specification to indicate how to output your values and use any of the operators from printf family to output your data.

提交回复
热议问题