How do I insert and delete in a two Dimensional Array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I insert and delete in a two Dimensional Array

Algorithm question

21st Feb 2020, 5:34 PM
AmgKhvbbi Schweppes
AmgKhvbbi Schweppes - avatar
5 Answers
+ 4
i don’t know if that possible in C++ but to my little knowledge you don’t delete you only overwrite the value by shifting the other values
21st Feb 2020, 5:45 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 1
Can you add a specific language in the tags to improve context clarity please?
21st Feb 2020, 5:42 PM
Ipang
+ 1
To my understanding (if you were talking regular arrays), arrays are static, they don't grow when you insert element(s), nor do they shrink as you delete element(s). You can resize arrays manually (in case of dynamically allocated array), as you see fit. But that's just about it. If you want a container that allows automatic growing and shrinking feature, then you may take a look at std::vector https://www.sololearn.com/learn/261/?ref=app
21st Feb 2020, 5:56 PM
Ipang
0
c++
21st Feb 2020, 5:42 PM
AmgKhvbbi Schweppes
AmgKhvbbi Schweppes - avatar
0
thanks for your answer
21st Feb 2020, 5:48 PM
AmgKhvbbi Schweppes
AmgKhvbbi Schweppes - avatar