Originally Posted by
Diablo84
As a side note, does c++ support associative arrays? eg: array["key"], array["anotherkey"] etc.
Yes, in C++ they're called maps.
Code:
#include <map>
#include <string>
using std::map,std::string;
...
map<string, int> array;
array["one"] = 1;
array["two"] = 2;
EDIT:
And there's no 'implode' function, but it's easy to write one:
Code:
#include <sstream>
#include <string>
template <typename T>
std::string implode(char ch, std::vector<T> vec)
{
std::stringstream out;
for (int p=0;p<vec.length()-1;++p)
out << vec[p] << ch;
out << vec[vec.length()-1];
return out.str();
}