Solved

cast keyword in C++

Posted on 2006-11-22
3
323 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now