I'm not sure why my 2d array initialization causes a seg fault, so I have
void viterbi_algorithm(double init[], double A[][26], double B[][2], int obs[],
int mostLikelyStates[]){
cout << "start" << endl;
double table1[26][68000];
double table2[26][68000];
..
If I comment out the two tables, everything will be okay. Am I asking for too much memories?
My error when I ran gdb
Program received signal SIGSEGV, Segmentation fault.
___chkstk_ms () at /usr/src/debug/gcc-4.8.1-3/libgcc/config/i386/cygwin.S:146
146 orq $0x0, (%rcx) /* probe there */