How can I get a new line in messagebox?

I have two TCHAR arrays, I can print both to separate MB but not both to one

This is what I'm looking for (if you can understand what I'm trying)

It obviously does not work.

TCHAR one[] = _T("file\\path\\here");
TCHAR two[] = _T("another\\file\\path\\here");

MessageBox(NULL, one ,_T("pathone"),0); //ok
MessageBox(NULL, two ,_T("pathtwo"),0); //ok

MessageBox(NULL, one + "\n" + two ,_T("pathoneandtwo"),0); //not ok

When I search all I find is "pathhere\nanotherpathhere" which is not what I need.

And I cannot use strcpy and strcat as they are wide or unicode or something, plus visual studio 2010 does not support wstrcpy.

I've tried a number of things, too many to list here

Any help with this please?

5 Years
Discussion Span
Last Post by Suzie999

I'm not completely sure but you might be able to do this

std::wstring basePath(L"file:");
std::wstring subPath(L"src/main.cpp");
std::wstring fullPath( basePath + L"\n" + subPath );

Thanks for the suggestion firstPerson

I should have explained, the two paths are external parameters and I cannot get a std string or wstring into them, this was just a very short producer of my problem.

appreciate your time.

@ Narue The problem is that C++ does not have any concantenation operators as far as I know, the problem in my code above would technically be syntax.

Thanks for you input.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.