Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

How to do graphics in gcc

tonyaimer

New Coder
I would like to ask a question about C graphics.

I regard myself as a hobbyist programmer transitioning from BASIC
to C. I do not intend to go to C++ or ever become a professional
programmer.

I would like to leave BASIC behind now and move forward with Linux
Mint and gcc. I have written a few small programs in C but I do regard
myself still as something of a beginner.

I am trying to do an example using graphics in C to draw simple lines etc.

The Book is called is called "Chaos and Fractals" by Peitgen et al
and the BASIC example is on p61 of that book if anyone has access to it.

I have heard about the <graphics.h> header which is very
old coming from Borland Turbo C days and not supported by gcc.

There are apparently ways to still reuse graphics.h in gcc but I have seen
warnings about not using a 16 bit header file for a 64 bit machine.

I am not sure where to go from here and even unsure of what questions to ask.

I worried about doing graphics in a GUI window because that might involve
even more complicated things that I was hoping not to get involved with
at this stage. Is there a modern equivalent of graphics.h that I should
look at?

What advice might people have for me on going forward? I really need some
sort of an idea of how to move forward. I have looked briefly at SDl
and openGL but these seem to be overkill at this stage.

Regards

Tony Aimer
Johannesburg
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom