Solved

cast keyword in C++

Posted on 2006-11-22
3
329 Views
Last Modified: 2006-11-23
Hi Experts,

There is a keyword, cast< > in C++.  How it is used?  Is it from the STL?  Can you please provide me an example of how to use this?
0
Comment
Question by:ambuli
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
rajeev_devin earned 300 total points
ID: 18000703
Never heard of cast, actually C++ don't have it.
Instead C++ have static_cast, const_cast, dynamic_cast, reinterpret_cast.

Check this link for detailed examples
http://www.cplusplus.com/doc/tutorial/typecasting.html
0
 
LVL 12

Expert Comment

by:rajeev_devin
ID: 18000714
The C++ style of casting is very safer than traditional C style casting.
Check those examples.
0
 

Author Comment

by:ambuli
ID: 18003681
Thanks Rajeev. My apologies.  I found out that cast is template provided by the xmlbeansxx.  
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question