User profile: JLBorges

User info
User name:JLBorges
History
Joined:
Number of posts:13349
Latest posts:

Reading data from text file, with commas, into a dynamic array of structs
[tt]boost::tokenizer[/tt] would certainly help. https://www.boost.org/doc/libs/1_79_0/libs/tokenizer...

error: cannot convert 'LPCWSTR' {aka 'const wchar_t*'} to 'LPCSTR' {aka 'const char*'}
[tt]std::filesystem::path::wstring()[/tt] would give a UTF-16 encoded string (windows).

Passing in an array of structs to a function
> If, however, in the OP param comes from passing a pointer from say [tt]new[/tt] or [tt]std::unique...

error: cannot convert 'LPCWSTR' {aka 'const wchar_t*'} to 'LPCSTR' {aka 'const char*'}
> On the Windows platform, it is much recommended to use "Unicode" (wchar_t*) strings for file names...

error: cannot convert 'LPCWSTR' {aka 'const wchar_t*'} to 'LPCSTR' {aka 'const char*'}
Using the standard filesystem library: [code]#include <iostream> #include <filesystem> #include <st...