Jan 14, 2012 at 4:56pm UTC
ISO C++ forbids variable length array.
Jan 14, 2012 at 5:02pm UTC
Huh?
It does work with smaller files?
text files, mp3 files and stuff...
Jan 14, 2012 at 5:03pm UTC
You are allocating the array on the stack so it is probably a stack overflow. Try allocate the buffer on the free store instead.
Last edited on Jan 14, 2012 at 5:07pm UTC
Jan 14, 2012 at 5:04pm UTC
How do I do that?
EDIT: Nevermind I got it! Thanks Peter87, that's the second question of me you've solved in less than a week :D
Last edited on Jan 14, 2012 at 5:07pm UTC
Jan 14, 2012 at 5:29pm UTC
It does work with smaller files?
Because your compiler allows non-standard behaviour. By all means take advantage of that, but it's only right that you should be aware of it. It's especially bad news if you want your code to be portable.
Jan 14, 2012 at 9:27pm UTC
Hmmm I see :)
And Peter, you have no life because you solved 2 questions? haha