error C2308: concatenating mismatched strings
c, c++, unicode, visual-c++, windows
Solution
You need to escape the `"`s in the wide string literal:
wchar_t glyph[] = L"\"SPC\"¦¦¦-++¦-+++---+\"SPC\"?????? ??? ?";
EDIT:
I missed the `SPC` macro (as already posted by Luchian and jrok):
#define SPC L" "
wchar_t glyph[] = L"" SPC L"¦¦¦-++¦-+++---+" SPC L"?????? ??? ?";
Problem
While trying to compile the Maze Generator/Solver in C as present in rosettacode in Visual Studio 2010, I am facing issue during compilation. The following line ``` # define SPC " " wchar_t glyph[] = L""SPC"│││─┘┐┤─└┌├─┴┬┼"SPC"┆┆┆┄╯╮ ┄╰╭ ┄"; ``` is throwing an Error ``` 1>d:\projects\maze_cpp\maze_cpp\main.cpp(14): error C2308: concatenating mismatched strings 1> Concatenating wide "" with narrow "?????? ??? ?" ``` Considering my limited knowledge with Unicode, and the unfriendly description of the error in MSDN, I am puzzled about the problem and how to solve it