Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
how to draw pixel in console c++
Name: Alex G. Date: September 18, 2002 at 06:54:22 Pacific OS: Win2000 CPU/Ram: 128
Comment:
Hello everybody, my question is simple for those who knows this. I would like to simply draw a pixel to a screen using c++. But i want to do it in console mode. Any suggestions are appreciated. Thanks, Alex
Name: Page Date: September 18, 2002 at 08:53:11 Pacific
Reply:
I know you have to change video mode.
0
Response Number 2
Name: cup Date: September 18, 2002 at 09:48:43 Pacific
Reply:
What compiler/version have you got? The calls vary from compiler to compiler and even from one version to the next.
0
Response Number 3
Name: Apple Date: September 18, 2002 at 18:18:56 Pacific
Reply:
it all depends on the OS, of course. Window winnt, you'll probably be blocked from directly accessing the video memory. Here is some assembly code (somebody please correct me if I screw this up):
; set 320x200x256 vga mode xor ax,ax mov al,13h int 10h
/* back to C if your OS manages memory with an iron fist you will probably get an error trying to write to this location. */ unsigned char *video = 0xa0000; video[ y * 320 + x ] = (unsigned char)color;
; set text mode. xor ax,ax mov al,6 int 10h
0
Response Number 4
Name: alex g. Date: September 30, 2002 at 10:33:38 Pacific
Reply:
I am using a gcc compiler. There should be some routines like putPixel() that draw pixel to screen Alex G.
Summary: iam working on natural language processing. and all the programming is done in VB with sql server 2000 as back end. we r planning to store sentences in the form of binary trees. the problem is iam not...
Summary: sir, in C i want to draw image in screen using graphics.to draw this first find length and width of image .and then putpixel command to put (x,y) position.i think like this.so HOW FIND LENGTH OF IMA...
Summary: How to read repeatedly 4 bites from a file and print it out in hexadecimal. The file is under .bin. I'm using Microsoft Visual C++ 6.0 to complie my program. yohannes ...