Nevermind, I figured it out. Here's what I did to compensate:
void getData(FILE *data, int *num1, int *num2, int *num3)
{
char num5;
fscanf(data, "%c", &num5);
*num3 = num5;
Type: Posts; User: seawolfxix
Nevermind, I figured it out. Here's what I did to compensate:
void getData(FILE *data, int *num1, int *num2, int *num3)
{
char num5;
fscanf(data, "%c", &num5);
*num3 = num5;
I can scan in A as a character, but I need to convert that to an integer somehow so that I can make the correct reference in my array. Is this possible?
For example, I need to scan in A as a...
If I scan in the character as an integer, won't an A be 65? I was then trying to subtract 65 so that I could reference the first value of my array(data[0]). Am I doing it wrong? Is that where I...
edit: will repost next week
Thanks for the help. I wrote the program, and I understand how I want it to work. It compiles right now, but I get a segmentation fault with a.out. I commented out the fopen part, and the program...
I have a homework assignment, and I don't expect people on the board to do it for me, but I do need some advice on how to begin. Should I load all the data into one array? Also, what would be the...