I can't understand why System namespace cannot be used
The universal Windows application is completely different from the traditional desktop application, please have the Windows Runtime and Win32 and COM APIs , which lists all the Win32 and COM APIs supported for use in UWP applications.
Is there any other way to print one line in the output? (I am using Visual Studio 2015)
If you need to print a message in the output window, use the OutputDebugString function in the UWP C ++ / CX project, adding #include to access it, for example:
void CPPUWPApp1::MainPage::LogMessage(Object^ parameter) { auto paraString = parameter->ToString(); auto formattedText = std::wstring(paraString->Data()).append(L"\r\n"); OutputDebugString(formattedText.c_str()); }
Using:
LogMessage("Hello World!");
source share