My friend Adrian points me to scanf_s that is not usable just by simple replacing scanf( src, “%s”, dest) with scanf_s but you also have to add an additional parameter for every string or character read, specifying the buffer size. For example, if dest was char dest[10] you’d have to write scanf_s( src, “%s”, dest, 10), otherwise an access violation will occur.