string in namespace std does not name a type March 23, 2023 by Tarik You need to #include <string> <iostream> declares cout, cin, not string.