[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
liboctave questions
From: |
Andrew Smallbone |
Subject: |
liboctave questions |
Date: |
Thu, 18 Jan 1996 22:17:41 GMT |
>>>>> "jwe" == "John W Eaton" <address@hidden> writes:
Andrew Smallbone <address@hidden> wrote:
:
: The following program:
: -------
: #include "Array.h"
: main(int argc, char *argv[])
: {
: Array<float> a(10);
: }
jwe> You need to tell the compiler to create an instance of the
jwe> Array<float> type. Try adding
jwe> template class ArrayRep<float>;
jwe> template class Array<float>;
jwe> to your file. With future versions of Octave, you will only need to
jwe> instantiate Array<TYPE>, and maybe someday, g++ will do this
jwe> automatically.
This fails also with the same error, but:
------
#include "Array.h"
#include "Array.cc"
//template class ArrayRep<float>; // works with or without
//template class Array<float>; // these
main(int argc, char *argv[])
{
Array<float> a(10);
}
------
works (where Array.cc is from the liboctave directory). I think
this is something to do with Implicit/Explicit Instantiation?
Thanks
Andrew
--
_______________________________________________________
Andrew Smallbone <address@hidden>
London Para||el Applications Centre +44 171 975 5168
---A5 AC A7 5E A2 10 81 18 09 F5 DB 6C 12 A9 07 A5---