Error (active) E2486 user-defined literal operator not found

I'm getting the above error in Visual Studio 2019. I'm posting a link to two screen shots so you can see what I'm talking about. I'm happy to post code as soon as I find out what you guys need.

https://d.pr/i/oG6994
https://d.pr/i/rKet6W
You need spaces between the string literals and the macros in the macro definition
1
2
//Note the spaces
#define NTALK_LOGFILE "logs" DIR_SYM "channels" DIR_SYM "ntalk.txt" 
The same for DELETE_DIR.
By the way, I assume DIR_SYM expands to "/" or "\\" depending on whether the OS is Windows or UNIX. Windows understands forwards slashes in paths at the API level, so you don't need to do that. This:
 
#define NTALK_LOGFILE "logs/channels/ntalk.txt" 
works everywhere.
Like a charm ;)

this is one of a good dozen reasons why macros are best avoided if you can .. they are difficult to debug and spot errors...
Topic archived. No new replies allowed.