19 Oct
2001
19 Oct
'01
4:44 p.m.
rajanikanth jammalamadaka [SMTP:rajanik3@rediffmail.com] wrote:
Hi! Jim, Could you please tell me why this code is not working:
#include <iostream> #include
using namespace boost; int main() { any holdsanything ; holdsanything = 9; std::cout<
Hi, Raj
You didn't specify what problems you were having. Am I correct in assuming
you get a compiler error on the std::cout lines? If so, then the problem is
that class 'any' does not have an extraction operator defined. If you change
the lines to:
std::cout << any_cast<int>(holdsanything)<