by: drowned |
last post by:
all right, check it out... I've got a practice exercise from "thinking
in c++" whose answer isn't covered in the annotated solutions guide,
so I'm trying to handle it, but I don't understand what...
|
by: R. Anbeeswaran |
last post by:
Hi All,
void main()
{
const int i = 20;
int *p = const_cast<int*>(&i);
*p = 40;
cout <<"i="<< i <<"\t"<<"*p="<<*p<<"\n";
}
|
by: S.Senthilvel |
last post by:
hi,
I am a little confused about the const_cast.I've thought it this way till
now.
//Proper cast
int i = 10;
const int* pci = &i;
int *pi = const_cast<int*>(pci);
|
by: johny smith |
last post by:
Can someone please give me some good reference site/information for
understanding when and why I would use
1.) const_cast
Don't know why you would do this?
2.) reinterpret_cast.
I have used...
|
by: AlesD |
last post by:
Hello,
I can't figure out how to build assignment operator for class which
contains "type* const value".
--- example ---
class parent_t;
class child_t {
|
by: CoolPint |
last post by:
While I was reading about const_cast, I got curious and wanted to know
if I could modify a constant variable through a pointer which has been
"const_cast"ed. Since the pointer would be pointing to...
|
by: Simon Bailey |
last post by:
In the following code at the end of the program z = 20 & y = 99.
void doit(const int* x)
{
int* nonconst;
nonconst = const_cast<int*>(x);
*nonconst = 99;
}
int main(int argc, char* argv)
|
by: Alexander Stippler |
last post by:
Hello,
I wonder if and in what cases casting const away by a const_cast can be
dangerous. In one place the only way I can imagine to realize a pretty
nice feature is casting away const. Now I...
|
by: George2 |
last post by:
Hello everyone,
In MSDN sample for const_cast,
http://msdn2.microsoft.com/en-us/library/bz6at95h(VS.80).aspx
There is a statement like this,
--------------------
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|