Похожие чаты

Can I declare array with the size of long long

int? like this one?
int arr[18446744073709551615];

13 ответов

32 просмотра

ask your platform.

Md. Redwan Hossain- Автор вопроса

shitty exam question

Md. Redwan Hossain
shitty exam question

That is, 1.84 x 10^ 20 x 4 bytes if int is 4 bytes which is ~736000000 terabytes

John
why should declaration care about runtime env ?

It should not but afaik it's a fixed length array, declaration is definition. Also declaring such large arrays will overflow stack.

Manav | avoid unnecessary messaging me
That is, 1.84 x 10^ 20 x 4 bytes if int is 4 bytes...

well that is -1 in signed integers iirc... but anyways stack can't be anywhere that big so compiler will deny it in code gen pass.

swarnim
well that is -1 in signed integers iirc... but any...

On todays computer. From the language construction (c++ 14) it is the type of size_t. Does standart prohibit that kind of thing ?

John
On todays computer. From the language construction...

standard shouldn't say anything about it from what I know C++ standards go to extreme lengths to not talk about implementation details

swarnim
well that's not always true

Some of the UB they have is them refusing to talk about stuff which is implementation defined, can't think of a concrete example atm. Also i don't think C++ standard defines an upper bound on the largest fixed sized array.

John
On todays computer. From the language construction...

stack size can is limited to platform object size no system i know of supports that much object size hence the conclusion.

Manav | avoid unnecessary messaging me
standard shouldn't say anything about it from what...

Thats why stack size is platform dependent (which i meant by runtime env). On 16 bit Segmented even you cannot allocate > 1MB.

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта