1

Found this old source for a autoclicker, I wanted to edit and tweak a few strings, so it would be a bit easier for accessibility reasons. https://gist.github.com/iGlitch/c55043119fce86e7bf04efc3aae1b5bf

But just trying to compile the code as it is, I get the following errors

main.cpp: In function 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)':
main.cpp:117:2: error: '_itoa_s' was not declared in this scope; did you mean '_itoa'?

Why is the function _itoa_s causing problems as it is? I tried to include < cstdlib > also, but it doesn't work. It also gives error on the 4 other _itoa_s functions.

Koppis
  • 109
  • 8
  • `std::to_string` see: https://en.cppreference.com/w/cpp/string/basic_string/to_string – Richard Critten Apr 11 '20 at 16:46
  • Didn't find the std::to_string that has the right attributes (maybe also as my knowledge in c++ isn't too big). I did include stdlib.h, but it gave me the same errors. – Koppis Apr 11 '20 at 16:53
  • Wouldn't it be the same as `snprintf(buffer, length, "%d", number)` (at least for radix=10)? `that has the right attributes` what attributes are you talking about? In the source code you linked I see only radix=10 used with `_itoa_s`, so use `std::to_string`. – KamilCuk Apr 11 '20 at 16:57
  • I can't seem to get it to work. Not too familiar to C++. How did the program use to compile, but now it shows errors? – Koppis Apr 11 '20 at 22:57

0 Answers0