This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 11th, 2012  |  syntax: None  |  size: 0.68 KB  |  views: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. vector<double> results;  
  2.  while(res->next()){
  3.       //commented out some stuff i've been trying
  4.       //results.puch_back( boost::lexical_cast<double>(res->getString("ret") ) );
  5.       //results.push_back(  (float)res->getString("ret") );
  6.         //results.push_back(reinterpret_cast<double>(res->getInt(4) ));
  7.             //results.push_back(res->getString(1));  
  8.     //cout << res->getInt(1) << endl;
  9.     //cout << res->getString("ret") << endl;
  10.      
  11.    //this works but
  12.      double res_double = res->getDouble(4);
  13.             //cout << res_double << endl; //this prints out and works fine!
  14.             results.push_back(res_double); //this prints out all zeros
  15.      
  16.     }
clone this paste RAW Paste Data