Hello,
I am currently trying to serialize the classes of a project I am working on, but I ran into a few compliation errors and I am kind of stuck, so I was hoping somebody here could help me on that.
I am using the 1.43 version of the boost library and gcc 4.4.1. (I'd like to add that all the examples in and tutorials from the documentation work fine for me).
I am trying to serialize a base class called "base" and it's derived class called "de" that use a shared pointer, and afterwards test my implementation by saving the an instance of a "de" object into a text archive and then restoring it.
These is the serialization implementation for my two classes for reference:
---"base.h"-----
#include<iostream>
#include<string>
#include<typeinfo>
#include "../config.h"
#include "../population.h"
#include "../rng.h"
#include<boost/shared_ptr.hpp>
#include<boost/archive/text_iarchive.hpp>
#include<boost/archive/text_oarchive.hpp>
#include<boost/serialization/version.hpp>
#include<boost/serialization/base_object.hpp>
namespace pagmo { namespace algorithm {
/// Base algorithm class.
class base;
/// Alias for shared pointer to base algorithm.
typedef boost::shared_ptr<base> base_ptr;
/// Base algorithm class.
class __PAGMO_VISIBLE base
{
public:
base();
/// Evolve method.
virtual void evolve(population&p) const = 0;
/// Clone method.
virtual base_ptr clone() const = 0;
virtual ~base();
std::string human_readable() const;
virtual std::string get_name() const;
virtual bool is_blocking() const;
protected:
virtual std::string human_readable_extra() const;
protected:
/// Random number generator for double-precision floating point values.
mutable rng_double m_drng;
/// Random number generator for unsigned integer values.
mutable rng_uint32 m_urng;
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive&ar, const unsigned int version){
std::cout<< "Serializing base algorithm"<< version<< std::endl;
}
};
}} //namespaces
std::ostream __PAGMO_VISIBLE_FUNC&operator<<(std::ostream&, const base&);
--------------------
--------"de.h"------
#include<string>
#include "../config.h"
#include "../population.h"
#include "base.h"
#include<boost/serialization/base_object.hpp>
namespace pagmo { namespace algorithm {
class __PAGMO_VISIBLE de: public base {
public:
de(int, const double& = 0.8, const double& = 0.9, int = 2);
base_ptr clone() const;
void evolve(population&) const;
std::string get_name() const;
protected:
std::string human_readable_extra() const;
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive&ar, const unsigned int version){
std::cout<< "Serializing de algorithm"<< version<< std::endl;;
ar& boost::serialization::base_object<base>(*this);
ar& m_gen;
ar& m_f;
ar& m_cr;
ar& m_strategy;
}
const int m_gen;
const double m_f;
const double m_cr;
const int m_strategy;
};
}} //namespaces
------------------------------
Saving works fine (and as far as I can tell, based on the documentation examples the information is saved correctly in the text archive). This is the program that I am using to save and restore from archive:
----test_serialzazion.cpp-----
#include<algorithm>
#include<boost/typeof/typeof.hpp>
#include<boost/utility/result_of.hpp>
#include<cmath>
#include<numeric>
#include<string>
#include<vector>
#include "../src/pagmo.h"
#include<cstdlib>
#include<iostream>
#include<fstream>
#include<boost/archive/text_iarchive.hpp>
#include<boost/archive/text_oarchive.hpp>
using namespace pagmo;
void save(const algorithm::de&alg, const char* filename) {
std::ofstream ofs( filename );
boost::archive::text_oarchive oa( ofs );
oa<< alg;
}
void restore(algorithm::de& alg, const char* filename)
{
std::ifstream ifs( filename );
boost::archive::text_iarchive ia( ifs );
ia>> alg;
}
int main()
{
algorithm::de de = algorithm::de(500,.8,.8,2);
std::cout<< "Testing algorithm:"<< de<< '\n';
std::string fileName = "test.txt";
save(de, fileName.c_str());
return 0;
}
------------------
However, adding the restore function to restore the object back from the text archive results in the following compilation errors:
In file included from /home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:91,
from /home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:22,
from /home/dante/pagmo/external_headers/boost/archive/detail/common_iarchive.hpp:23,
from /home/dante/pagmo/external_headers/boost/archive/basic_text_iarchive.hpp:31,
from /home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:24,
from /home/dante/pagmo/tests/../src/algorithm/base.h:36,
from /home/dante/pagmo/tests/../src/algorithms.h:31,
from /home/dante/pagmo/tests/../src/pagmo.h:30,
from /home/dante/pagmo/tests/test_serialization.cpp:34:
/home/dante/pagmo/external_headers/boost/archive/detail/check.hpp: In function ‘void boost::archive::detail::check_const_loading() [with T = const int]’:
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:571: instantiated from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::text_iarchive, T = const int]’
/home/dante/pagmo/external_headers/boost/archive/detail/common_iarchive.hpp:68: instantiated from ‘void boost::archive::detail::common_iarchive<Archive>::load_override(T&, int) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/basic_text_iarchive.hpp:67: instantiated from ‘void boost::archive::basic_text_iarchive<Archive>::load_override(T&, int) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:71: instantiated from ‘void boost::archive::text_iarchive_impl<Archive>::load_override(T&, int) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:60: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator>>(T&) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:67: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator&(T&) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/tests/../src/algorithm/de.h:80: instantiated from ‘void pagmo::algorithm::de::serialize(Archive&, unsigned int) [with Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/serialization/access.hpp:118: instantiated from ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:74: instantiated from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:182: instantiated from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/tests/test_serialization.cpp:89: instantiated from here
/home/dante/pagmo/external_headers/boost/archive/detail/check.hpp:162: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
/home/dante/pagmo/external_headers/boost/archive/detail/check.hpp:162: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
/home/dante/pagmo/external_headers/boost/archive/detail/check.hpp: In function ‘void boost::archive::detail::check_const_loading() [with T = const double]’:
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:571: instantiated from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::text_iarchive, T = const double]’
/home/dante/pagmo/external_headers/boost/archive/detail/common_iarchive.hpp:68: instantiated from ‘void boost::archive::detail::common_iarchive<Archive>::load_override(T&, int) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/basic_text_iarchive.hpp:67: instantiated from ‘void boost::archive::basic_text_iarchive<Archive>::load_override(T&, int) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:71: instantiated from ‘void boost::archive::text_iarchive_impl<Archive>::load_override(T&, int) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:60: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator>>(T&) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:67: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator&(T&) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/tests/../src/algorithm/de.h:81: instantiated from ‘void pagmo::algorithm::de::serialize(Archive&, unsigned int) [with Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/serialization/access.hpp:118: instantiated from ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:74: instantiated from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:182: instantiated from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/tests/test_serialization.cpp:89: instantiated from here
/home/dante/pagmo/external_headers/boost/archive/detail/check.hpp:162: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
/home/dante/pagmo/external_headers/boost/archive/detail/check.hpp:162: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
In file included from /home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:23,
from /home/dante/pagmo/tests/../src/algorithm/base.h:36,
from /home/dante/pagmo/tests/../src/algorithms.h:31,
from /home/dante/pagmo/tests/../src/pagmo.h:30,
from /home/dante/pagmo/tests/test_serialization.cpp:34:
/home/dante/pagmo/external_headers/boost/archive/basic_text_iprimitive.hpp: In member function ‘void boost::archive::basic_text_iprimitive<IStream>::load(T&) [with T = const int, IStream = std::basic_istream<char, std::char_traits<char> >]’:
/home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:52: instantiated from ‘void boost::archive::text_iarchive_impl<Archive>::load(T&) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:107: instantiated from ‘static void boost::archive::load_access::load_primitive(Archive&, T&) [with Archive = boost::archive::text_iarchive, T = const int]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:356: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_primitive::invoke(Archive&, T&) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:433: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::invoke(Archive&, T&) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:586: instantiated from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::text_iarchive, T = const int]’
/home/dante/pagmo/external_headers/boost/archive/detail/common_iarchive.hpp:68: instantiated from ‘void boost::archive::detail::common_iarchive<Archive>::load_override(T&, int) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/basic_text_iarchive.hpp:67: instantiated from ‘void boost::archive::basic_text_iarchive<Archive>::load_override(T&, int) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:71: instantiated from ‘void boost::archive::text_iarchive_impl<Archive>::load_override(T&, int) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:60: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator>>(T&) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:67: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator&(T&) [with T = const int, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/tests/../src/algorithm/de.h:80: instantiated from ‘void pagmo::algorithm::de::serialize(Archive&, unsigned int) [with Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/serialization/access.hpp:118: instantiated from ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:74: instantiated from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:182: instantiated from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/tests/test_serialization.cpp:89: instantiated from here
/home/dante/pagmo/external_headers/boost/archive/basic_text_iprimitive.hpp:88: error: ambiguous overload for ‘operator>>’ in ‘((boost::archive::basic_text_iprimitive<std::basic_istream<char, std::char_traits<char> > >*)this)->boost::archive::basic_text_iprimitive<std::basic_istream<char, std::char_traits<char> > >::is>> t’
/usr/include/c++/4.4/istream:119: note: candidates are: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>& (*)(std::basic_istream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]<near match>
/usr/include/c++/4.4/istream:123: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]<near match>
/usr/include/c++/4.4/istream:130: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]<near match>
/usr/include/c++/4.4/istream:238: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]<near match>
/home/dante/pagmo/external_headers/boost/archive/basic_text_iprimitive.hpp: In member function ‘void boost::archive::basic_text_iprimitive<IStream>::load(T&) [with T = const double, IStream = std::basic_istream<char, std::char_traits<char> >]’:
/home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:52: instantiated from ‘void boost::archive::text_iarchive_impl<Archive>::load(T&) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:107: instantiated from ‘static void boost::archive::load_access::load_primitive(Archive&, T&) [with Archive = boost::archive::text_iarchive, T = const double]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:356: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_primitive::invoke(Archive&, T&) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:433: instantiated from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::invoke(Archive&, T&) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:586: instantiated from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::text_iarchive, T = const double]’
/home/dante/pagmo/external_headers/boost/archive/detail/common_iarchive.hpp:68: instantiated from ‘void boost::archive::detail::common_iarchive<Archive>::load_override(T&, int) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/basic_text_iarchive.hpp:67: instantiated from ‘void boost::archive::basic_text_iarchive<Archive>::load_override(T&, int) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/text_iarchive.hpp:71: instantiated from ‘void boost::archive::text_iarchive_impl<Archive>::load_override(T&, int) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:60: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator>>(T&) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/archive/detail/interface_iarchive.hpp:67: instantiated from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator&(T&) [with T = const double, Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/tests/../src/algorithm/de.h:81: instantiated from ‘void pagmo::algorithm::de::serialize(Archive&, unsigned int) [with Archive = boost::archive::text_iarchive]’
/home/dante/pagmo/external_headers/boost/serialization/access.hpp:118: instantiated from ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:74: instantiated from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/serialization/serialization.hpp:133: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/external_headers/boost/archive/detail/iserializer.hpp:182: instantiated from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::text_iarchive, T = pagmo::algorithm::de]’
/home/dante/pagmo/tests/test_serialization.cpp:89: instantiated from here
/home/dante/pagmo/external_headers/boost/archive/basic_text_iprimitive.hpp:88: error: no match for ‘operator>>’ in ‘((boost::archive::basic_text_iprimitive<std::basic_istream<char, std::char_traits<char> > >*)this)->boost::archive::basic_text_iprimitive<std::basic_istream<char, std::char_traits<char> > >::is>> t’
/usr/include/c++/4.4/istream:119: note: candidates are: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>& (*)(std::basic_istream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:123: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:130: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:166: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:170: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:173: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:177: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:180: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:184: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:188: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:193: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:197: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:202: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:206: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:210: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:214: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/istream:238: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]
Any Ideea of what I am doing wrong or what am I missing? Thank you and sorry for the trouble.
Best regards,
Dante Stroe