I am currently doing a research about implement a C++ programe by using Q-learning algorithm to help the agent get the reward.
I am trying to use the Hashtable to store my states and Actions. I am not familiar with the C++ programming...
What i am trying to do is like using hashtable to store the Arrays. but i can not find the right way to store it... the hashtable said it is an error type of the array.
using namespace std;
int state[2] = {0,0};
unordered_map<string, int> hashtable;
hashtable.emplace("State1", state);
cout << "the State of State1 is :" << hashtable["State1"] << endl; cin.get();
Error C2664 'std::pair<const _Kty,_Ty>::pair(std::pair<const _Kty,_Ty> &&)': cannot convert argument 2 from 'int [2]' to 'const int &' myproject c:\program files (x86)\microsoft visual studio
14.0\vc\include\xmemory0 737
Does C++ HashTable can Store an Array as Key and Value? If it Doesn't is there any way to store an Array in a table? which like the Python dictionary function....
Thanks!