|
-
static_cast C++ keyword Query.
Hi All
I am not able to find out the correct usage of the keyword
<static_cast>.
can some body explain it with example?
Also
void main()
{
int a = 100, b = 30;
float f = a/b;
printf("%f",f);
}
void main()
{
int a = 100, b= 30;
float f = static_cast<float>(a/b);
printf("%f",f);
}
the output of both the progs is same.
what difference has the keyword <static_cast> made in the 2nd prog?
waiting for response
Regards
Davinder
:mad: :mad:
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks