Thread
:
type mismatch: cannot convert from double to float
View Single Post
#
1
(
permalink
)
11-15-2007, 07:28 PM
bugger
Senior Member
Join Date: Nov 2007
Posts: 111
type mismatch: cannot convert from double to float
I have following line of code:
Code:
float average = 12.2;
It gives me following error
Code:
Type mismatch: cannot convert from double to float
I tried few things and was able to fix it using:
Code:
float average = 12.2f;
I don't know why f is required with float value. Please explain.
Sponsored Links
bugger
View Public Profile
Send a private message to bugger
Find all posts by bugger