Actually this doesn't solve my real problem. The problem is shown in the code attached. This is the real problem without any simplification. So if you could know the problem or how to fix it I will be thankful. I hope the code is simple.
One of the problems is that line 55-66 is calling that function with too few arguments. float_3d_memory() takes three arguments, not two.
Pay close attention to the errors and warnings that your compiler gives you. If it doesn't give you any then you need to increase the warning level. How to do that depends on the compiler you are using. I used vc++ 2010 express on Windows 7 and got 26 errors like the one I mentioned above.
You are right. I added 1 in the 3rd field to be(line 55):
as well as the next 5 lines. However still it crashes...This time Dev C++ 's C compiler didn't give me any warning...