Posts LeetCode 常见API
Post
Cancel

LeetCode 常见API

主要记录一些常见的小细节,int 转 str.str 转 int等。 C++实现。

  • int 转 str

    1
    2
    
      int i = 12;
      string s = to_string(i);
    
  • str 转 int

    1
    2
    
      string s("0123");
      int i = atoi(s.c_str());
    
This post is licensed under CC BY 4.0 by the author.

Contents

Trending Tags