79332597

Date: 2025-01-06 09:25:17
Score: 2.5
Natty:
Report link

In case you want the index access in a constant time, this is not possible, as the array might be between other heap variables. The closest thing you can get is realloc. This gives you the possibility to increase an existing memory allocation. But if this is not possible, it will copy the contents to a new location.

Depending on your problem, there might be other solutions to this problems:

Some mixing is also possible. You may store a list of pointers to blocks of e.g. 10000 Elements and overload the index operator.

Reasons:
  • RegEx Blacklisted phrase (2.5): Do you know the
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: arch