hi everybody,
the double type is 8B, right ?
So if i use this code :

double pear[500000000];

it will use 4GB of Ram ? or there's a limit for arrays ?
thanks

Because of this memory problem the creator of C++ came up with pointers and dynamic memory.

Look into that if you need a memory management.

So if i run this code what will happen ?
Will my computer crash ? i have only 4GB of ram
thanks

Probably it won't crash your computer, your operating system won't let it happen.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.