-
May 11th, 2002, 01:34 AM
#1
Member
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.)
-
May 11th, 2002, 01:47 AM
#2
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.
-
May 11th, 2002, 01:58 AM
#3
Member
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
-
Forum Rules
|
|