0

I am getting this error. Launch Failed, binary not found.

I am new to C++, so I am unsure where to start with this.. it was compiling until I added "swap".

enter image description here

Austin
  • 3,010
  • 23
  • 62
  • 97

1 Answers1

1

"Binary not found" is the result of a failing compilation - check the compiler output, it says assignment of read-only reference. That's because you cannot assign to variable str, since it's declared as const parameter to the permute method.

The solution depends on how your method should work:

  • If permute should modify the variable given as parameter str (i.e. the string you use as parameter when permute is called), then remove the const in the method declaration
  • If you only use str inside the method, and the string variable used for the method call should remain unchanged, then create a copy of it (e.g. std::string strCopy(str);) and work with that instead of str.
codeling
  • 11,056
  • 4
  • 42
  • 71