A drugo pitanje: moze li se kako napisati highlight funkcija, ali koja ne radi pomocu poznatog niza stringova, i bez koriscenja graphics header-a i REGS varijanti (da bi sve to moglo da se kompajlira pod windows-om i sa Borland C++ 5.02) ?
Na netu sam nasao ovo, ali compile mi ne uspeva:
Code:
#define offset c*2
void highlight (int start_c, int end_c, int row)
{
char *ptr;
int c, adress, r=row;
ptr=(char *)0xb8000000;
for (c=start_c; c<end_c; c++)
{
adress=r*160+offset;
*(ptr+adress+1)=0x07; // accessing attributes of charecters
} // and reversing them.
}
#define offset c*2
void highlight (int start_c, int end_c, int row)
{
char *ptr;
int c, adress, r=row;
ptr=(char *)0xb8000000;
for (c=start_c; c<end_c; c++)
{
adress=r*160+offset;
*(ptr+adress+1)=0x07; // accessing attributes of charecters
} // and reversing them.
}
Dame biraju uvek pogresne tipove ... Na srecu ...