Searching doubles in C++
Results 1 to 3 of 3

Thread: Searching doubles in C++

  1. #1

    Searching doubles in C++

    Hey, I was wondering if there is a way to search a double for a character, like a '.'. I know you can do this with strings but is it possible to search a double?
    Sitting Duck Security check it out

    (All right, all right, you guys talked me into it, I will just learn PHP instead of using ASP.)

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Posts
    638
    Well there is no standard library function that searches a numeric type for a given value. But you could easily convert the double to a string and then search for the '.' character.
    OpenBSD - The proactively secure operating system.

  3. #3
    I tryed to convert the double to a string already, but I get the error : can't convert 'double' to 'char'. Perhapes I am doing this wrong, I just started C++ about 1 month ago so there is a large possiblity that I did it wrong. I made 'char search[50]' then I tryed to use a loop to assign each digit to the array. If this is wrong could you please post a piece of code on how to do this.
    Sitting Duck Security check it out

    (All right, all right, you guys talked me into it, I will just learn PHP instead of using ASP.)

Posting Permissions

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

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides