Solved

cast keyword in C++

Posted on 2006-11-22
3
330 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

697 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