EDIT: Ok so I've been looking as some examples and trying to work out some stuff.
I'll just take the first part for now, std::vector<std::string>
is it necessary to have the std:: part when coding? or is this just a way of writing it for a definition?
Code:
#include <string>
int main(int argc, char* argv[]) {
std::string mystring = "Hello, World!";
return 0;
}
Is the same as:
Code:
#include <string>
using namespace std;
int main(int argc, char* argv[]) {
string mystring = "Hello, World!";
return 0;
}
Is the same as:
Code:
#include <string>
using namespace std::string;
int main(int argc, char* argv[]) {
string mystring = "Hello, World!";
return 0;
}
However, I believe "using namespace std" is frowned upon (globally), due to potential name clashes with _your_ function names.