473,322 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Is there a way(function) to distingusih between different data types?

Is there a way(function) to distingusih between different data types?

if u can, provide me with the code...

thank u...
Apr 23 '07 #1
4 1600
JosAH
11,448 Expert 8TB
Have a look at the typeid() operator (include <typeinfo>) or else simply use
dynamic_cast<...>(...)

kind regards,

Jos
Apr 23 '07 #2
Thank u so much about it !!
Apr 23 '07 #3
AdrianH
1,251 Expert 1GB
F.Y.I.

When using dynamic type casting or using typeid you must ensure that the compiler has that feature enabled. Some disable it by default which will result in undefined behavior.


Adrian
Apr 23 '07 #4
weaknessforcats
9,208 Expert Mod 8TB
dynamic_cast requires run-time type identification and that requires a database for every object with virtual functions. That will slow your program.

Also, typeid and dynamic_cast don't work for objects that have no virtual functions.

What are you trying top do exactly??
Apr 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ba | last post by:
I'm using asp.net 2.0 and am writing a webform using the formview control. The <%# Bind("") %> syntax makes sense for textboxes, but I cannot figure out how to bind a dropdown list to a column....
5
by: Chad A. Beckner | last post by:
Hi, I am developing an application and need to make it so the application data is stored in some manner. I am thinking of an XML file as the data source. I would like to setup 2 way data...
18
by: Abhishek | last post by:
lets consider that I have defined an integer like this. int a=5; now taking the fact that an integer is allocated 2 bytes in memory and the memory address increases in the left to right direction,...
0
by: Steven Blair | last post by:
Hi, A bit long winded this one, but would be grateful for some help. I have a problem using the Wizard component and can think of only two ways of completing the task. Can anyone with some...
0
by: AM | last post by:
The following block of code defines a FormView control "FormView1" with an EditItemTemplate which has a Label and a TextBox control within it. While the Label "RequestIDLabel1" has one-way...
0
by: EricLondaits | last post by:
Hi, I have an ASP.NET page with a ListBox that is data bound to a table with a single field (it holds a list of valid IDs). The page also has a textBox into which you can add new valid IDs, one...
1
by: Monty M. | last post by:
Does anyone know how to perform two way data binding between a combo box and a listview. The listview is bound to a dataset table in code: Binding Bind = new Binding(); DataTable dt;...
4
by: mavie | last post by:
hi everyone... i have a perl script that takes our version numbers and displays it somewhere else. i want it to display the versions in the sequence they were added.. can anyone please help?...
0
by: =?Utf-8?B?TWlrZSBNaWxpYW4=?= | last post by:
I have a dropdownlist control in a formview and I am trying to enable 2 way databinding. Only, the option is not available. I look at the "Edit Databinding" option of another DDL control in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.