I need to create a stack from the Element300 type of size 3 and print it out in the function print. I'm having trouble defining the stack and passing it through to the print function though.
When you declared a Element300 pointer you haven't actually allocated any memory for the array yet. So unless you intend 'stackArray' to be a pointer pointing to a array of floats, unexpected things will happen. Note that declaring arrays requires you to know the maximum amount of items beforehand so if you're making a stack I suggest you use a dynamic array like a 'vector' or 'list' Also, the variable 'top' should be a pointer as well since it appears you are storing the address of the current element of the stack array in it.
Disclaimer : I'm a new programmer so anything I've said may or may not have been completely correct, I have researched it though.