I'm confused on the code.
I'm confused on the code.
Shouldent NULL be, 78, 85, 76, 76, or just 0 or, 4E, 55, 4C, 4C
ok much simpler it is basically this:
SetConsoleTextAttribute (GetStdHandle(STD_OUTPUT_HANDLE), colour#);
so just put in a number where colour# is anything between 0 and 256 then everything you print after that code will be in that colour.
¿Red Baron?
"Imagination is more important than knowledge"
-Albert Einstein (1879-1955)
Check out my games!
[code] /* dont forget code tags! */ [/code]
Thank you so much. It wasent working it first but I forgot to include the <windows.h> header.
Shouldent NULL be, 78, 85, 76, 76, or just 0 or, 4E, 55, 4C, 4C
THE Attached Files VERY GOOD
u might try doing some stuff with the video memory.the video memory starts from b8000000H.every letter that is displayed has 2 bytes attached to it in the video memory,thats in layman terms,i dont know how to put it into proper technical language.
the first byte represents the letter that is to be displayed.the next 2 are the attributes of the text.that is whether u want the text to be displayed in some particular color,whether it is blinking ...
you can play around with it if u want.
here is some sample code
this will display the text in red.i know that this is somewhat of a weird way of changing colors,but well,i think this should work.try it only if your functions dont get you anywhere.Code:#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<graphics.h> #include<initgrp.h> #include<clearsc.h> int main() { char far *ptr=0xb8000001; int i; clear(); for(i=0;i<4000;i++) { *ptr=0x04; ptr+=2; } printf("this is the last value of i %d",i); getch(); return 0; }
hope this was helpful
ciao
Don't Bump threads or Spam.