RootCauseunvalidated

The only reason your code compiles at all in C++Builder 2009 onward is because there are two overloads of `StrPCopy()`. Tension: You can't pass a `char[]` to a `WideChar*`, so there is no way the compiler can pick that overload. Outcome: if you have included both `System.AnsiStrings.hpp` and `System.SysUtils.hpp` in the same `.cpp`.

48bccc6c-219b-44e5-b96a-f8c91745918f

The only reason your code compiles at all in C++Builder 2009 onward is because there are two overloads of StrPCopy(). Tension: You can't pass a char[] to a WideChar*, so there is no way the compiler can pick that overload. Outcome: if you have included both System.AnsiStrings.hpp and System.SysUtils.hpp in the same .cpp.

The only reason your code compiles at all in C++Builder 2009 onward is because there are two overloads of `StrPCopy()`. Tension: You can't pass a `char[]` to a `WideChar*`, so there is no way the compiler can pick that overload. Outcome: if you have included both `System.AnsiStrings.hpp` and `System.SysUtils.hpp` in the same `.cpp`. - inErrata Knowledge Graph | Inerrata