473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Kinda stuck, a bit rusty

main.cpp file
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <power.h>
  3. #include <NTL/RR.h>
  4.  
  5. #define NTL_NO_MIN_MAX
  6.  
  7. using namespace std;
  8. NTL_CLIENT
  9.  
  10. int main()
  11. {
  12. RR x, y, z;
  13. x = 5;
  14. y = 2;
  15.  
  16. z = power(x, y);
  17.  
  18. cout<<z<< "\n";
  19. cin.get();
  20. }
  21.  
power.h file
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <NTL/RR.h>
  3.  
  4. #define NTL_NO_MIN_MAX
  5.  
  6. using namespace std;
  7. NTL_CLIENT
  8.  
  9. ZZ power(ZZ x,ZZ y)
  10. {
  11. ZZ a, b;
  12. b = x;
  13. for(a = 1; a < y; a++)
  14. {
  15.           b = b*x;
  16. }
  17. return b;
  18. }
  19.  
Error Messages talking about line:
Expand|Select|Wrap|Line Numbers
  1. z = power(x, y);
  2.  
C:\Dev-Cpp\Projects\main.cpp In function `int main()':
16 C:\Dev-Cpp\Projects\main.cpp no matching function for call to `power(NTL::RR&, NTL::RR&)'
note C:\Dev-Cpp\Projects\power.h:10 candidates are: NTL::ZZ power(NTL::ZZ, NTL::ZZ)
note C:\Dev-Cpp\Projects\power.h:10 NTL::RR NTL::power(const NTL::RR&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::RR&, const NTL::RR&, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::quad_float NTL::power(const NTL::quad_float&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::quad_float&, const NTL::quad_float&, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::xdouble NTL::power(const NTL::xdouble&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::xdouble&, const NTL::xdouble&, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::xdouble NTL::power(const NTL::xdouble&, const NTL::ZZ&)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::xdouble&, const NTL::xdouble&, const NTL::ZZ&)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::ZZ&, long int, long int)
note C:\Dev-Cpp\Projects\power.h:10 NTL::ZZ NTL::power(const NTL::ZZ&, long int)
note C:\Dev-Cpp\Projects\power.h:10 void NTL::power(NTL::ZZ&, const NTL::ZZ&, long int)
C:\Dev-Cpp\Projects\Makefile.win [Build Error] [main.o] Error 1
Mar 27 '11 #1
1 1482
Aight, never mind, I found my error in line 12 of the main.cpp file, RR should be ZZ
Mar 27 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will toward any of the individuals who have been...
10
by: David P. Jessup | last post by:
Lets see if I can explain this so I can get a good answer =) I'm trying to speed up a file search via FSO. I have a database that contains the exact path where files can be found and an "index"...
0
by: ccd | last post by:
as of now, i am stuck at this step 6 of the following section http://www.asp.net/webmatrix/tour/section3/formatdatagrid.a spx When the Collection Editor dialog box appears, it does not show...
1
by: Brian Cesafsky | last post by:
I have the following code that will create an amortization schedule, but I need to do the following and can't figure it out. 1) instead of creating an amortization schedule where you know...
3
by: David Hearn | last post by:
I've been doing ASP.NET for the past few years and have gotten spoiled and now find myself in a situation where I need to make some changes to an old classic ASP page. The problem is that there is...
0
by: SM | last post by:
Hello, I have a xml file that contains the CD library of one artist. I want to extract all the tracks from a specific CD. I was able to extract the title of all the cd's but not the tracks of one...
13
by: Jack B | last post by:
I'm using Access 2002 to create a database for a small opera company that my wife is involved in, and I'm more than a bit rusty because I haven't created a new Access database since about 1999. ...
46
by: C C++ C++ | last post by:
what is an escaping variable?
23
by: Raz | last post by:
On Wed, 30 Apr 2008 21:54:37 GMT, Erik Wikströ As I said, I will find the link again. His knowledge of C++ is just fine. ...
0
by: Naldo | last post by:
Hi there I'm trying to make a spreadsheet, which reads other spreadsheets and displays info accordingly. I'm stuck though. I read off one spreadsheet where I find the col required (row 1) then...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.