CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Posts
    171

    numeric vs strings

    I noticed that alot of my doc data are ints & floats, which I have to convert to strings when using many of the controls . . . so wouldn't it be better to just declare them as CStrings or regular strings since my conversions to ints & floats would be less than my conversions to strings? Hope this makes sense. Guess I would like to have some kind of rule on deciding what types to declare the data in doc (which will be persistant. Thanks for anyone's input!


  2. #2
    Join Date
    Sep 1999
    Posts
    21

    Re: numeric vs strings

    I would say that if your data isn't really textual then using CString's would be excessive. You don't really need the comparatively large memory overhead of a CString object, so I would just keep them as simple numeric types and write some generic conversion functions to convert the different numerics to strings and back again.

    MikeM


  3. #3
    Join Date
    Aug 1999
    Posts
    171

    Re: numeric vs strings

    Mike, thanks. Appreciate your input.


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