Using exponents/decimals with NTL library

Hello everyone!

I am having a little trouble with some code. I am working with very big numbers so I decided to use the NTL c++ library. The equation that I was using involved using the pow() function as well as using decimal numbers.

Now that I have the NTL library I can't figure out how to use pow() and I can't find out how to store decimal numbers using NTL. The only thing I understand is how to make an integer. Here is an example of some code(that doesn't work):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include<iostream>
#include <NTL/ZZ.h>

using namespace std;
using namespace NTL;

int main() {

 ZZ a, b, c; 
   cout << "Enter a:";
   cin >> a;
   cout << "Enter b:";
   cin >> b; 

   c = pow(a,b);
   cout << "c equals " << c << endl;

	//End the program
	system("pause");
	return 0;
}


Anyone have any ideas how to get this code to work? Also, is there a way I could use decimal numbers with the NTL c++ library? Thanks!
Topic archived. No new replies allowed.