Well, in the first place, it isn't smaht to show a line number if you don't show enough code for us to count lines, or at least highlight the line as YOU know it. We're not sitting in your chair looking at your screen.

Secondly, the construct, MAT[] = {1,1,2,1,0,0,0,0}; is not a workable runtime operation. It is only good at compile time, when the compiler does you a favor by converting it into an initialization sequence (which becomes a permanent part of the program prior to its conversion to actual executable code).

In C/C++ arrays are not an atomic thing that can be assigned to in one swell foop. They are a collection of individual items that must be treated individually. Your code is NOT ansi C code, despite your claims to the contrary.

Last edited by DaWei; 11Aug2007 at 03:12..