?
Solved

now what?? naive question

Posted on 2000-04-04
3
Medium Priority
?
236 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 100 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

741 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