Solved

now what?? naive question

Posted on 2000-04-04
3
230 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

932 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now