1

I have a following test function

bool test(std::string input)
{
  // do something with input

}

I would like to call this function from gdb. How do I pass string as a parameter

bool test2(const char* input)
{
  // do something with input

}

For this one

(gdb) call test2("test")

seems to work fine. when I try for test I get the following :

(gdb) call test("test")
Cannot resolve function test to any overloaded instance
Andreas Wenzel
  • 22,760
  • 4
  • 24
  • 39
Helen9999
  • 11
  • 1

0 Answers0