|
|
|
|
|
|
|
|
auto is a storage class specification, like static, register, or extern. It isn't a type, so you can't declare something of type auto. You can use it on any type, like so: auto int nothing;. It really isn't necessary to use it though, because it is assumed by default that all variables have automatic storage duration unless specified otherwise.
string is part of the standard library, so you either have to have a using namespace std directive in the file where you use it, or scope it properly (i.e. std::string). I prefer the latter, because then you're avoiding conflicts with all the other std library declarations and your own code.
|
|