What kind of this language?

Thread Starter

asdf arfw

Joined Sep 9, 2017
43
I'm learning about graphic functions in C or C++. At first I tried to use gotoxy() function but it didn't work so I google it and
found the answer. It because that function is an old function and my compiler doesn't have it so they recommend me to use
SetConsole functions instead but then another question come into my head. What kind of language is this? I never saw it before.
Does anyone know? just give me a topic and I'll read it by myself.

upload_2017-10-25_15-2-3.png

P.S. my english isn't good because it's my 2nd language. Hope you understand me btw.
 
Last edited:

Thread Starter

asdf arfw

Joined Sep 9, 2017
43
I mean..
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN); <---- what is this?
is it C language?
 

MrChips

Joined Oct 2, 2009
30,618
gotoxy(int x, int y) is a text console library function to position the text cursor to a particular location on the screen given by line-y at position-x.
 

WBahn

Joined Mar 31, 2012
29,932
While the language is C/C++, I think the issue you are trying to get at is that the graphics functions are NOT part of the language. C doesn't have much in the way of intrinsic I/O capability and those are all text console and file oriented. So if you want to do graphics, you have to use a library of routines (or write your own) to do it for you and how you do graphics is SO different from machine to machine that using those libraries is pretty much guaranteed to make your code non-portable.

The old conio.h was a non-standard library for doing more sophisticated console I/O tasks, such as moving the cursor around or detecting individual keystrokes. The Windows.h library is conceptually similar, except that it focusses on using Windows O/S capabilities so that the code will compile and run on machines using Windows.
 
Top