本文介绍了C ++ CLI中的MOD和DIV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好!我是C ++ / CLI的菜鸟,我想问一个小问题: 我需要得到两个整数变量A和B的MOD和DIV , 如何用正确的语法和 A = A(MOD)B和A = A(DIV)B 我应该在我的代码中添加一个特殊的标题才能使用它们!???谢谢解决方案 虽然Simon完全正确,但也有 ldiv_t ldiv(long int numerator,long int denominator); 它将分子除以分子的整数商和余数作为 ldiv_t 类型的结构,这个结构有两个成员quot和rem。如果你需要这两个结果,调用ldiv会更有效率。 最好的问候 Espen Harlinn Hi everyone! I am a noob in C++/CLI, I d like to ask a small question:I need to get the MOD and the DIV of two integer variables A and B,How can I do A=A(MOD)B and A=A(DIV)B in the right syntax and... should I add an special header to my code in order to use these!??? THANKS 解决方案 这篇关于C ++ CLI中的MOD和DIV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-02 16:15