Just enough to jumpstart my brain. Thanks! Basically i have a 24x80 map that a person can move around. I wanted to be able to find their position on the screen, and if that position was equal to a T, then do something. I think this below will work out.
Code:
#include <stdio.h>
int main()
{
char test[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char single_test[] = " ";
int i;
clrscr();
printf("Variable: %s\r\n", test);
/* Code here to go 10 characters out, and set the variable */
for (i = 0; i < 26; i++) {
if (test[i] == 'T')
printf("The %dth character is: %c\r\n", i + 1, test[i]); }
getch();
}
Works great in this setup, just need to plug it into my movement routine.