UI programming

Sorry if i come out as a retard, but how do you make a application with a UI from nothing, only using the standard library in C.

You have stdin (e.g keyboard) and then stdout (console) and stderr (console). Thats the only human interface you have in standard library. So basically you are able to create command line tools.

Anything else comes with usage of other libraries (e.g. GTK or WIndows API ).

1 Like

I don't know how experienced you are with programming. But, if you wanted to create a GUI you could look into the Unreal Slate code. They're using a custom built implementation of the C++ standard library, but I'm sure a lot of the low level building blocks would transfer well to C / C++.

gtk and qt would be worth a look as well.

So...
Using the standard C library there is no direct way to make applications with a Windowed GUI from nothing; neither on Windows or Linux. That is because Windowed applications are handled and managed by the operating system, and C is a language targeted at system development (think kernel). The only way would be to import an operating system library or an API that simplifies and uses it (GTK), to create a GUI. However, if you want to use the terminal (command prompt) you can use the stdio.h library built into c to handle user input. Alternatively you can make GUI-ish programs in the terminal with libraries like curses.

Damn, this was a while ago. Yeah i was a retard lol. Found out about Qt with C++ and it’s great!