The main issue here is that push and pop assume an array of variable length, which in turn means dynamic allocation.
While C supports dynamic allocation (malloc and free), it is considered something you should avoid whenever possible on arduino, because there's so little memory - problems like memory fragmentation are very easy to cause. This is why on the forums we always tell people not to use String (the String class, with capitol S, relies on dynamic allocation), and use c strings (fixed length null terminated character arrays) instead.
You can simulate it with a fixed length array (up until you reach that length), but you have to write the code to keep track of where the "end" of the array is.