Recent content by cheers00

  1. C

    C/C++ Why is my C++ regex not matching?

    doubling back slash worked. thank you
  2. C

    C/C++ Why is my C++ regex not matching?

    I am wondering why this is not matching. I tested my regular expression on notepad2 and it matches fine. [FONT="Courier New"]std::string line = " 10 0 5 0"; std::regex rgx("\s+\d+\s+\d+\s+\d+\s+\d+"); if (regex_match(line, rgx)) { // do something... int a = 2; }
  3. C

    C/C++ Is using string as expression possible in c++?

    Also, can you please give me an example to how to use variable parameter? cheers
  4. C

    C/C++ Is using string as expression possible in c++?

    Serena, thanks. But I also had to change isinteger function to isNumber. The following seems to work but let me know if I can make it better. [FONT="Courier New"][SIZE="3"][SIZE="2"]inline bool isNumber(char *&src, double &number) { if (!isdigit(*src)) return false; int integer = 0...
  5. C

    C/C++ Is using string as expression possible in c++?

    Hi "I like Serena"', your code doesn't work with decimal numbers. Wondering if it is a easy thing to do.
Back
Top