CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Join Date
    Jun 1999
    Posts
    153

    Re: Generics for numbers?

    Quote Originally Posted by Aurrin
    I tried that. Unfortunately, that is quite useless, as it also allows string, int, bool, etc. I needed to pare it down to things that could do floating-point math, so that when I wrote
    I think you're stuck with C++ then.
    Kevin

  2. #17
    Join Date
    Feb 2006
    Posts
    89

    Re: Generics for numbers?

    Nah. It's not worth the hassle (at this stage, anyway) to do that. I'll just stick with double for now. Variable-precision would be nice, but it's not required.

  3. #18
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: Generics for numbers?

    FYI double is faster than float and much, much, MUCH faster than decimal so picking it as your base type is a good decision.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured