So in my header i made a string: string s; The compiler freaks out at this. I know that string is part of iostream::std. Do I have to include it in the header instead of in the .cpp file then? If so is it bad if other files that use the header include iostream? How do I deal with that?
Edit: Also for vector since it seems I’ll be needing it a lot in my assignment.
Edit2: I remember seeing #ifndef in a lot of examples of headers and I feel like it may help with my question, but I can’t seem to find a good explanation.
stringandvectorare separate fromiostream, and all three are part of thestdnamespace. You just have to properly qualify them in your header files.Assignment.h