User forums > Using Code::Blocks

Can't find declaration for std::to_string() and std::stoi()

(1/1)

Pacfrog:
Hello, I'm using Code::Blocks on Debian 12, with the following version info: Version: 20.03+svn13046-0.1+b2.I have noticed that when I write standard C++ code using std::to_string() or std::stoi(), the code compiles and runs perfectly, but when I right-click and choose "Find declaration", Codeblocks shows:

Warning: Not found "to_string"
Warning: Not found "stoi"

Here's my sample code

--- Code: ---#include <iostream>
#include <string>

using namespace std;

int main() {
  string str = to_string(123); // Double-click 'to_string' then right-click Find declaration of: 'to_string'
  int i = stoi("123");         // also here
  return 0;
}


--- End code ---

Things I've tried:
1. Verified string header is present.
2. Tries the same setup on Windows with Codeblocks, and the exact same problem happens.

Thanks in advance for your help!
This is my first time posting here, so please kindly guide me if I missed anything.

Navigation

[0] Message Index

Go to full version