I'm curious about something when creating a new class in c++.
In my main.cpp I have both of these:
#include <iostream>
#incude <string>
However, in the header file of my other class, FeedInfo.h, what do I need to include to be able to use strings there as well?
For example, If I want to create a string in my .h:
std::string feed;
This code will successfully compile when I only use #include <iostream>
OR when i only use #include <string>
-- or when I use both, of course.
This confused me because in main.cpp I have to use both - but in .h file I only need one of them - so which one do I include?
Thank you.