I\'m studying C++ and I need to create structure Airplane
and work with it.
My structure Airplane.h
#include \"stdafx.
The problem with entering type is that the input buffer contains the new line character after entering n. You should use member function ignore to clear the buffer before using function getline.
As for your second question then in general you should track the size of a dynamically allocated array yourself. Or you can set the last element of the array as NULL and use it as a sentinel.