c++ - Regarding create a NTL class type -


thanks looking

i trying create class

long lprime,lgenerator;     lprime = atol(vout[1].c_str()); zz aliceprime;     aliceprime = new zz(99999,lprime); 

i not sure init_val_type asking me input.

i got error:

udpechoclient.cpp:85:34: error: no matching function call ‘ntl::zz::zz(int, long int&)’ udpechoclient.cpp:85:34: note: candidates are: /sw/include/ntl/zz.h:113:1: note: ntl::zz::zz(ntl::zz&, ntl::init_trans_type) /sw/include/ntl/zz.h:113:1: note:   no known conversion argument 1 ‘int’ ‘ntl::zz&’ /sw/include/ntl/zz.h:176:8: note: ntl::zz::zz(ntl::init_val_type, double) /sw/include/ntl/zz.h:176:8: note:   no known conversion argument 1 ‘int’ ‘ntl::init_val_type {aka const ntl::init_val_struct&}’ /sw/include/ntl/zz.h:180:8: note: ntl::zz::zz(ntl::init_val_type, float) /sw/include/ntl/zz.h:180:8: note:   no known conversion argument 1 ‘int’ ‘ntl::init_val_type {aka const ntl::init_val_struct&}’ /sw/include/ntl/zz.h:172:8: note: ntl::zz::zz(ntl::init_val_type, const char*) /sw/include/ntl/zz.h:172:8: note:   no known conversion argument 1 ‘int’ ‘ntl::init_val_type {aka const ntl::init_val_struct&}’ /sw/include/ntl/zz.h:61:1: note: ntl::zz::zz(ntl::init_val_type, unsigned int) /sw/include/ntl/zz.h:61:1: note:   no known conversion argument 1 ‘int’ ‘ntl::init_val_type {aka const ntl::init_val_struct&}’ /sw/include/ntl/zz.h:60:1: note: ntl::zz::zz(ntl::init_val_type, long unsigned int) /sw/include/ntl/zz.h:60:1: note:   no known conversion argument 1 ‘int’ ‘ntl::init_val_type {aka const ntl::init_val_struct&}’ /sw/include/ntl/zz.h:58:1: note: ntl::zz::zz(ntl::init_val_type, int) /sw/include/ntl/zz.h:58:1: note:   no known conversion argument 1 ‘int’ ‘ntl::init_val_type {aka const ntl::init_val_struct&}’ /sw/include/ntl/zz.h:57:1: note: ntl::zz::zz(ntl::init_val_type, long int) /sw/include/ntl/zz.h:57:1: note:   no known conversion argument 1 ‘int’ ‘ntl::init_val_type {aka const ntl::init_val_struct&}’ /sw/include/ntl/zz.h:49:1: note: ntl::zz::zz(const ntl::zz&) /sw/include/ntl/zz.h:49:1: note:   candidate expects 1 argument, 2 provided /sw/include/ntl/zz.h:37:1: note: ntl::zz::zz(ntl::init_size_type, long int) /sw/include/ntl/zz.h:37:1: note:   no known conversion argument 1 ‘int’ ‘ntl::init_size_type {aka const ntl::init_size_struct&}’ /sw/include/ntl/zz.h:33:1: note: ntl::zz::zz() /sw/include/ntl/zz.h:33:1: note:   candidate expects 0 arguments, 2 provided 

firstly new wrong. aren't allocating object, constructing object.

secondly, assuming i'm reading header file right, , assuming understand trying do, want

zz aliceprime(init_val, lprime); 

inti_val constant forces compile choose constructor gives aliceprime initial value, instead of, say, initial bit size.

ntl documentation poor.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -