P
Pranav
template <class X>
class Node{
:
:
};
template <class X>
class Link {
:
:
Node<X> *a1, *a2;
};
int main( )
{
Link<float> list1;
int ret=0, x;
list1.addnode(0.1234);
:
:
:
}
I am gettin followin Bug/Warning when I use <float>
warning C4305: 'argument' : truncation from 'const double' to 'float'
also my data gets truncated into float to int..,
But when I use double I get no bug/warning..,
What may be the possible source of the bug/warning?
class Node{
:
:
};
template <class X>
class Link {
:
:
Node<X> *a1, *a2;
};
int main( )
{
Link<float> list1;
int ret=0, x;
list1.addnode(0.1234);
:
:
:
}
I am gettin followin Bug/Warning when I use <float>
warning C4305: 'argument' : truncation from 'const double' to 'float'
also my data gets truncated into float to int..,
But when I use double I get no bug/warning..,
What may be the possible source of the bug/warning?