I have numbers represented as chars (eg. '11.27') I want to type cast it to a double but im getting "pointer value used where a floating point value was expected". Any ideas?

Recommended Answers

All 3 Replies

I should demonstrate how I'm preforming the operation.

return(((double)node->key)-48);

where node->key = char[10]

Strings and character arrays cannot be typecast as values. They can only be converted. Look up string to number conversion techniques.

If only it was that easy, lol. Thanks for the tip.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.