Having issue with using getline function

Hi,
I was going through the C++ training, though the IDE used is C lion but l am using Visual studio 2022. While working with strings , l had issues using the getline function when writing a name with space in between.
Is there any head file l need to include that will enable the getline work on my visual studio 2022?
image

use ‘string’ not ‘string.h’

Thanks a lot, it worked!