在我的代码中使用 mpir_ui 类型时遇到问题 [英] Trouble using mpir_ui type in my code

查看:36
本文介绍了在我的代码中使用 mpir_ui 类型时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用这个功能

int mpz_cmp_ui (mpz t_op1, mpir_ui op2)

为此我必须提供 mpir_ui

For that I have to supply mpir_ui

所以每当我试图声明这一点时,

so whenever I try to declare this ,

 mpir_ui myui; 

它说:

 Error: identifier mpir_ui is undefined 

我是否缺少任何头文件?

Am I missing any header file?

所有其他类型和函数都可以工作,但只有这一个失败了.

All other types and functions work , but only this one is failing.

这些是我的头文件

#include < cstdio>
#include < stdlib.h>
#include < stdio.h>
#include < gmpxx.h>
#include < iostream>
#include <mpirxx.h>
#include <math.h>
#include <windows.h>
#include <mpir.h>
#include<time.h>
#include<string>

推荐答案

您缺少 mpir.h.当您使用mpz_cmp_uimpir_ui 时,您需要#include mpir.h 来获取它们的定义.

You are missing mpir.h. When you use mpz_cmp_ui or mpir_ui, you need to #include mpir.h to get their definitions.

这篇关于在我的代码中使用 mpir_ui 类型时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆