It will fail because that is an attempt to create an object on the stack, and your stack is not 2 GB in size. We call this "Stack overflow"; http://en.wikipedia.org/wiki/Stack_overflow
Your compiler has limits also. It has to work out in advance where things will go in memory and all that sort of thing. Clearly your compiler is unable to deal with an array of this size.
If you must have an array of this size, I suggest that you firstly think of a better way to do it, and secondly don't use arrays but start using C++ containers.
That is 2,147,483,647 bytes, which is the largest value a 32-bit signed long can represent. It is just one under 2^31 (or one under (2^32)/2). Recall a byte is generally 8 bits and is the smallest that C++ can deal with, char is a byte, short is two bytes, int is generally but not always 4 bytes, long is 4 bytes, long long is 8 bytes, float is 4 bytes, double is 8 bytes, and sometimes long double is better than double but for some compilers they are the same.
If you array exceeds the maximum number of bytes then you're out of luck.
That's the largest signed integer value your system can handle, and it needs those integers to handle memory. You're coming up against the limits of your system.
You're probably trying to compile this in 32-bit mode, so declaring an array this large can't possibly be done.
It should work when compiling for a 64-bit target.
I think buffbill is talking about leap years, which means you wouldn't have exactly 365 days per year. What is this for anyway? It seems really useless.