by: Suzanne Vogel |
last post by:
I'd like to convert a double to a binary representation. I can use the
"&" bit operation with a bit mask to convert *non* float types to binary
representations, but I can't use "&" on doubles.
...
|
by: Christopher Benson-Manica |
last post by:
enum foo {a,b,c,d};
int main()
{
unsigned int bar=reinterpret_cast< unsigned int >( a );
return bar;
}
g++ rejects the code based on the reinterpret_cast, so I presume it is
not legal. ...
|
by: Alex Vinokur |
last post by:
Should 'delete below (after casting to void*)' work fine?
------------------------------------------
char* p1 = new (nothrow) char;
if (p1 == 0) return;
void* p2 = reinterpret_cast<void*> (p1);...
|
by: asdf |
last post by:
for (int k=static_cast<int>(box_.min_z());
k<=static_cast<int>(box_.max_z()); k++)
warning: converting
to `int' from `double'
thanks.
|
by: Peter |
last post by:
I never used reinterpret_cast -- probably because I don't know what it
means.
Can somebody enlighten me?
I looked into Stroustrup's "The annoted C++ reference manual" -- but
this was no help....
|
by: Noah Roberts |
last post by:
What steps do people take to make sure that when dealing with C API
callback functions that you do the appropriate reinterpret_cast<>? For
instance, today I ran into a situation in which the wrong...
|
by: J.M. |
last post by:
I have data in a double array of length 2N, which actually represents
complex numbers with real and imaginary parts interlaced. In other words,
elements in this array with even indices represents...
|
by: jasm |
last post by:
hello everybody!
I have used reinterpret_cast for interpret a class object as a char*.
This is the object:
template<class T>
class Coordinates {
public:
T *x;
T *y;
|
by: Unpopular |
last post by:
void directory::modification()//???????????
{
clrscr();
cout<< "\n\t @@@@@@ @@@@@ @@@@@ @@@@@@ @@@@@ @ @
@@@@@@ ";
cout<< "\n\t=====@ @ @ @ @ @ @@...
|
by: saurabh |
last post by:
I am trying to understand reinterpret_cast,here is what i tried,
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int x=1;
int* y=&x;
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|