?
Solved

cast keyword in C++

Posted on 2006-11-22
3
Medium Priority
?
334 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 1200 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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 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 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.
Suggested Courses

770 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