[bigint] Probably a bug while using BigInteger
Backes Thierry <backes.thierry at gmail.com>
Wed Jan 4 09:01:32 PST 2012
Hey. I use the newest version of BigInteger(bigint-2010.04.30) with this
code:
#include <iostream>
#include "bigint_include\BigIntegerLibrary.hh"
using namespace std;
#define MAX 6
BigInteger fib(int n)
{
BigInteger fib_arr[MAX+1];
int i;
fib_arr[0]=0;
fib_arr[1]=1;
for(i=2;i<=n;i++){
fib_arr[i]=fib_arr[i-1]+fib_arr[i-2];
}
return fib_arr[n-1];
}
int main(){
cout << fib(MAX) << endl;
system("pause");
return 0;
}
When I try to compile it with Microsoft Visual Studio C++ 2010 express, I
receive those errors:
1>------ Erstellen gestartet: Projekt: bigint, Konfiguration: Debug Win32
------
1> main.cpp
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
""public: void __thiscall BigInteger::operator=(class BigInteger const &)"
(??4BigInteger@@QAEXABV0@@Z)" in Funktion ""class BigInteger __cdecl
fib(int)" (?fib@@YA?AVBigInteger@@H at Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
""public: __thiscall BigInteger::BigInteger(int)" (??0BigInteger@@QAE at H@Z)"
in Funktion ""class BigInteger __cdecl fib(int)"
(?fib@@YA?AVBigInteger@@H at Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
""public: void __thiscall BigInteger::add(class BigInteger const &,class
BigInteger const &)" (?add at BigInteger@@QAEXABV1 at 0@Z)" in Funktion ""public:
class BigInteger __thiscall BigInteger::operator+(class BigInteger const
&)const " (??HBigInteger@@QBE?AV0 at ABV0@@Z)".
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen
==========
I dont know if its a bug or I made an error
Thanks, Thierry Backes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mattmccutchen.net/mailman/archives/bigint/attachments/20120104/a332945a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 10183 bytes
Desc: not available
URL: <http://mattmccutchen.net/mailman/archives/bigint/attachments/20120104/a332945a/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 12454 bytes
Desc: not available
URL: <http://mattmccutchen.net/mailman/archives/bigint/attachments/20120104/a332945a/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 8046 bytes
Desc: not available
URL: <http://mattmccutchen.net/mailman/archives/bigint/attachments/20120104/a332945a/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 34125 bytes
Desc: not available
URL: <http://mattmccutchen.net/mailman/archives/bigint/attachments/20120104/a332945a/attachment-0007.obj>
More information about the bigint
mailing list