i'm learning c++ and want to know if there is a way to target all systems in one method when i want to write directly to the console
i wrote a windows program where I'm using
it works fine. i have 2 questions, what do i do to do that in a way which will work on any system? is that even possible?PHP Code:
int main()
{
// Create Screen Buffer
wchar_t *screen = new wchar_t[nScreenWidth*nScreenHeight];
HANDLE hConsole = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL);
SetConsoleActiveScreenBuffer(hConsole);
DWORD dwBytesWritten = 0;
...
screen[nScreenWidth * nScreenHeight - 1] = '\0';
SetConsoleTextAttribute(hConsole, 0xaa);
WriteConsoleOutputCharacter(hConsole, screen, nScreenWidth * nScreenHeight, { 0,0 }, &dwBytesWritten);
}
Results 1 to 16 of 16
-
01-27-2019
-
-
-
-
-
-
I am the owner of http://www.ezmangaforum.com
-
01-28-2019
o don't need help compiling. I want to know specifically about targeting wstrings and wchar_t* (Unicode) for sure that writes to tty
-
-
-
01-28-2019
I think I'm just going to port my code to JavaScript and html5 and forget this shit. it'll be much easier
-
01-28-2019
no go deeper and port it to assembly
I am the owner of http://www.ezmangaforum.com
-
01-28-2019
You can use this lib for node.js https://github.com/dtinth/screen-buffer and wrap it with electron including GUI then export to any system
-
-
01-28-2019
I think you should use a for loop
-
01-28-2019
my programs use a lot of for loops because everything I write is based on the threadlong framework
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)