CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: coversion

Threaded View

  1. #1
    Join Date
    Nov 2009
    Posts
    128

    Question coversion

    my problem is to get number of decimals digits after the decimal in a number of type double.So i have written below code.but it displays the ERROR which is


    cannot convert parameter 1 from 'std::string' to 'char *'

    Code:
    string s;
     string t;
     wsprintf(s, "%g" ,error_bound);
     t = s.substr(s.find(".")+1);
    
     return t.length();
    where did i go wrong ?
    pls help.
    Last edited by dskp; October 4th, 2011 at 01:55 AM.

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