what i tried is... I am writing code to print all the c-language character set ASCII codes [0-255] along with characters (256)! As we know in C, function declaration or header file declaration is optional!
void main()
{
int i = 0;
char c1, c2;
printf("ASCII code\tCharacter\n");
printf("----------\t---------\n");
//printing
while (i <= 255)
{
printf("%d\t%c\n", i, i);
i += 1;
}
/*
my code to move the cursor in console screen
using up & down arrows!
ASCII codes of up & down arrows are(0 & 72) & (0 & 80)
when i press any other non-data key it comeout from program!
*/
c1 = getch();
while (c1 == 0)
{
c2 = getch();
if (c2 == 72)//up arrow
gotoxy(wherex(), wherey()-1);
else if (c2 == 80)
gotoxy(wherex(), wherey()+1);
else //any other key
break;
c1 = getch();
}
}
In turbo-C IDE i can able to see only last console screen, and i can able to move the cursor only within that 1 page console screen only! What i need to do is i want to see from 0th ASCII onwards!
What i got in turbo-C IDE is...
I am also using Borland-C++ 5.02 IDE. In that IDE i can't even move the cursor! But i am sure gotoxy(), wherex(), wherey() functions are working in that Borland-C++ IDE. Because i allredy checked by writing a small piece of code only accepting arrow keys and functions also worked properly. Actually i am a new be for C/C++. Just working out advanced level for my practise only!
Then, I have downloaded the following C/C++ IDE for my windows7 OS.
<Dev-C++ 5.4.0 verion IDE>.
In that IDE when i use these functions...
gotoxy(), wherex(), wherey()
Undefined reference to 'gotoxy', 'wherex', 'wherey' linker errors.
I saw a question in this site. I was instructed to download latest header file from http://conio.sourceforge.net/ and I got the same errors!
Can anyone suggest me? i am just willing to write some funny and tricky console screen programs. seeking help, for how to add external conio library for dev-C++ IDE or code-blocks IDE? please provide me with fully in detail! I must need the solution on other than turbo-C++ IDE, preferable DEV-C++ OR CODE-BLOCK-IDE FOR WINDOWS7 OS! giving links more help full for me! thanks in advance