Status access violation

I'm not good in solving this error. Can somebody help me fix this problem. I can't seem to find the one causing the status access violation error.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  #include<stdio.h>
#include<strings.h>
#include<math.h>
#include "scrabble.h"//include user defined library "scrabble.h"

main(){
	int i = 1, c, choice;
	char dict[178692][100];
	char letter[100] = {"A", "A", "A","A", "A", "A", "A", "A", "A", "B", "B", "C", "C", "D", "D", "D", "D", "E","E","E","E","E","E","E","E","E", "F", "F", "G", "G", "G", "H", "H", "I", "I","I", "I","I", "I", "I", "I", "J", "K", "L", "L", "L", "L", "M", "M", "N", "N", "N", "N", "N", "N", "O", "O", "O", "O", "O", "O", "O", "O", "P", "P", "Q", "R", "R", "R", "R", "R", "R", "S", "S", "S", "S", "T", "T", "T", "T", "T", "T", "U","U","U", "U", "V", "V", "W", "W", "X", "Y", "Y", "Z"};
	char board[22][11];
	FILE *fp;
	if((fp=fopen("dictionary.txt","r"))==NULL){
		printf("Scrabble dictionary not found!\n");
	}
	else{ 
		while(!feof(fp)){
			fscanf(fp,"%s\n",dict[i][100]);	
			i++;
			c=getc(fp);
			if(c==EOF) break;
		}
	}
	print_scrabble(board);
}	



Btw, the dict[i][100] functions as the dictionary. i is the number of words in the dictionary and 100 is the max length of each word. I'm trying to scan the words in my dictionary.txt at the start and then put them on the dict array
Last edited on
The error seems to be coming on fscanf(fp,"%s\n",dict[i][100]).
Anybody knows how to make this work?
I'm trying to manipulate an array of strings but I'm having trouble printing and scanning them. It keeps giving me the status access violation, dumping stack trace error.

Please help.
Topic archived. No new replies allowed.