One way to do so can be to generate 2 numbers (using rand()).
Divide one of them by a multiple of 10. Add the result to the original number.
e.g.
First number: 25
Second Number: 35.
Divide second by 100 (102) and add it to the original.
another possibillity is to do a linear mapping of rand(). (obvious problem, resolution)
You could also play with the bits. Wonder what distribution will that give you.
Depending how random you want your random number to be, you could try getting a random integer of the same size and reinterpret_cast it to a double/float. Is there a specific range you want to limit the random number to?
Modern standard C++ has uniform_real_distribution which provides floating-point random numbers. It was introduced in the TR1 library extension in 2005 and became part of the C++ standard in 2011.
Example (works in Visual Studio 2010, gcc 4.5.2, and most other modern compilers)