GMP problem

View: New views
1 Messages — Rating Filter:   Alert me  

GMP problem

by abansal5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello ,

This is Ankur . I was trying to install gmp in unix today , which i think i installed it properly but i do not know how to

COMPILE a program like :


        using namespace std;

        int main (void)

{
        mpz_class a, b, c;
        a = 1234;
        b = "-5678";
        c = a+b;
        cout << "sum is " << c << "\n";
        cout << "absolute value is " << abs(c) << "\n";
        cin >> a;
        return 0;
        }
       
you must include iostream and gmpxx.h files for the above program
       
Say I am in dirctory like ~/gmp/gmp-4.2.1 , and three directories (include ,info , lib) are in ~/HPC

Can you tell me the command how to compile this kind of program

Thanks a lot

Ankur





_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://gmplib.org/mailman/listinfo/gmp-bugs