I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index »

Slow and unsafe code

bunbun68\′s Photo
30 Oct 11, 9:41PM
Slow and unsafe code
1) It is not necessary to precompute how many fields there are in the string. You can just append to the vector as you are going along.<p> 2) What happens if some fields cannot be converted to a double (e.g. empty fields)?<p> 3) Returning vectors by value is inefficient for C++03. For more modern c++, you can use boost::spirit with simpler and much much faster code.
Currently you need to be logged in to leave a message.