sql - Converting mysqlpp::String to C++ int -


ok, i'm relatively new using mysqlpp library used in visual studio connect mysql database , having trouble trying convert vector of type mysqlpp::string vector of type int. have experience mysqlpp , mind helping me out little? i've posted example of i'm trying below appears in code. assume vector futureitemsets populated , want copy on contents integer vector. can provide!

vector<int> timeframeitemsets; vector<mysqlpp::string> futureitemsets;  for(int j = 0; j < static_cast<int>(futureitemsets.size()); j++) { timeframeitemsets.push_back(futureitemsets[j]); } 

mysqlpp::string has operator int() code snippet should work. problem having it?

if want more explicit, can use mysqlpp::string's conv function:

int = futureitemsets[j].conv<int>(0); timeframeitemsets.push_back(i); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -