anyone know why that is it works fine in Dev C++
i can still declare them as globals
anyone know why that is it works fine in Dev C++
i can still declare them as globals
it should be a simple matter to declare and array.
int main( )
{
char array[ 20 ];
return 0;
}
it wont let you do this??
Yeah it should work. I use dev, turbo, and msvc and I can declare arrays in main in all of them. Check your syntax.
Post some code so we can see what you're doing wrong.
-Prelude
My best code is written with the delete key.
okay it was because the array was to big apperntly there is a lower limit on array size in msvc++ for global variables. It dosn't really matter though i was just wonderning why that was.
You're probably overflowing the stack.
i just wonder why it only happens in those specific conditions
>i just wonder why it only happens in those specific conditions
What conditions? Post some code and I'm sure someone will be able to give a definitive answer instead of having to be vague. If it is overflowing the stack (which I suspect it is, because the linker used by Dev C++ sets up a larger default stack), then if you really need a large local array you can use linker settings to make it possible.
However, I don't think you're making sense with -
as there's no lower limit on globally allocated stuff, so again post the code.there is a lower limit on array size in msvc++ for global variables