Solved

now what?? naive question

Posted on 2000-04-04
3
234 Views
Last Modified: 2012-05-04
I think I am being rather naive here.. I hope though that I will still get an answer...
 I have been reading C and C++ and I am in position to say that I know some things.. I finished one of my textbooks yesterday and they sth very simple occured to me..
 How could I possibly colour a single pixel on my screen??
 I don't thing my textbooks would cover sth like this... I am sure that there must be some library that will provide me with the functions to do graphics... how would this function be implemented though? Is there some kind of low level C that is not in my textbook or would such a function have to turn to assembly??

 I thank you in advance you all fine people :)

 Nick
0
Comment
Question by:anemos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 2684558
The answer depends on what system you are programming for.

Under MS Windows you have the SetPixel() function.  It, amazingly, sets the color of a pixel on the screen.

Under MSDOS you have access to the screen buffer itself but it's more complicated since you have to get the display hardware into a graphics mode.  Often the programming environment you are using has some sort of graphics lib.

Unix/Linux systems generally use X.  I'm not that familiar with X programming but I suspect that there is a capability similar to the Windows SetPixel function.
0
 
LVL 32

Expert Comment

by:jhance
ID: 2684562
One other thing.  There is NOTHING in either C or C++ language itself that deals specifically with graphics.

That doesn't mean it can't be done, it  just that there must be some extra library that provides the capabilities you are asking for.
0
 

Author Comment

by:anemos
ID: 2685255
I am sorry for not making myself clear..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question