About 18 results
Open links in new tab
  1. String to double without std::stod - Code Review Stack Exchange

    Apr 25, 2018 · This is composed of a prepNumber, Parser, converter and stod functions. prepNumber is a structure used by Parser and converter. Parser parses the string into a prepNumber, converter converts it to double.

  2. An exception-safe wrapper for std::stoi - Code Review Stack …

    Nov 2, 2018 · Stack Exchange Network. Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

  3. c++ - string to double - Code Review Stack Exchange

    Aug 10, 2021 · Stack Exchange Network. Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

  4. Read and write triangulated surfaces - Code Review Stack Exchange

    Nov 1, 2021 · Recently, I wrote a class which can load an .obj file into vector array, and save the vector array as an .obj file. The .obj file looks something like this: v 0.041159 -0.342570 1.029412 //vertices

  5. Convert string to double and check for errors

    Jul 19, 2018 · The following program converts a string to a double, and checks for errors. It uses the strtod() function to do the conversion, and follows the example given for the strtol() function from the man...

  6. Time duration conversion with units - Code Review Stack Exchange

    Sep 25, 2021 · \$\begingroup\$ @Mast Just return a negative duration in that case? Negative things can be very useful sometimes. Consider for example that you want a way to sync video frames with audio, and the audio can either be ahead or behind the video, and you want the user to specify a delay to be applied to the audio stream to correct for

  7. Income tax rate calculator in c++ - Code Review Stack Exchange

    Apr 22, 2021 · But you do use std::stod()… which is in <string>… which you don’t include. It “works” probably because <string> is being included by something else… but you can’t count on that. double TaxesDue(double &income); double HighestRate(double &income); It is very rare to take function parameters by non-const lvalue reference. There are ...

  8. Arithmetic Expression evaluator - Code Review Stack Exchange

    Oct 26, 2020 · This program takes text input and evaluates the expression. This is meant to be an exercise. I reinvented a stack class though I know C++ provides one in the standard library but it isn&quot;t mean...

  9. PostgreSQL datatypes for libpq in c++ - Code Review Stack …

    Aug 12, 2014 · Following on from my earlier question: Very simple PostgreSQL ORM in C++ using libpq (tldr; I'm creating a set of helper classes for working with libpq) I've decided to have another attack at the

  10. Converting a double to a std::string without scientific notation

    May 13, 2015 · Problem I need to convert a double to a std::string which contains no scientific notation and no unnecessary fillers. Using std::fixed with iostream yielded ugly results - extra fillers (0's). The

Refresh