#include <string>
class string_container
{
public:
string container;
};
This whole structure works if I make container an int instead. It just doesn't recognize string as an object in the external file for some reason. The error I am getting is 'string' does not name a type
You guys were right. It works now. I had no idea string was part of the std namespace. Thank you for the help. I was looking in all the wrong places for answers.
You don't have to type std::cout or std::cin everytime you use them in a program. You can also add using std::cout; using std::cin; at the top of the code instead of usingnamespace std; (you might still need to add the std:: prefix to things like string or vector, or endl, but you can also write using statements for them too)
yeah I was just letting him know that the std namespace has more than just cout and cin in it. and if you do your method with the using std::WhatEver
you should only put that in the function/scope you are actually using it in and not the global scope but if you do use that in the global scope it is atleast better than the whole namespace usingnamespace std;