From: jpyubero <gva09@elai.upm.es>
To: gcc-help@gcc.gnu.org
Subject: Template problem
Date: Mon, 02 Apr 2001 07:20:00 -0000 [thread overview]
Message-ID: <3AC88C48.EEC7AFDB@elai.upm.es> (raw)
Hi,
I compiled the program Xvision perfetly under RedHat, but now I`ve
install Mandrake and It's no possible.
When I typing make the exit is:
make
g++ -g -I- -I. -I~/xvision/include -I~/xvision -w -c prueba.cxx -o prueba.o
In file included from Video.hh:41,
from CWindow.hh:34,
from BasicFeature.hh:37,
from FTypes.hh:32,
from Line.hh:33,
from prueba.cxx:5:
Image.hh:31: return type specified for `operator XVImage<float>'
make: *** [prueba.o] Error 1
The file Image.hh is:
#ifndef Image_hh
#define Image_hh
#include "Tracker.hh"
#include "XVImage.hh"
class Image : public XVImage<int>
{
public:
Image (int ncols_in = 0, int nrows_in = 0)
: XVImage<int>(nrows_in, ncols_in)
{}
Image (XVImage<int>& im)
: XVImage<int>(im)
{}
#if (XV_OS == XV_IRIX)
operator XVImage<float>() {
float* floatData = new float[storesize];
for (int i = 0; i < storesize; i++)
floatData[i] = (float)image[i];
XVImage<float> newImage(nrows, ncols, floatData
delete floatData;
return newImage;
}
#else
XVImage<float> operator XVImage<float>()
{ //Number of line 31
float* floatData = new float[storesize];
for (int i = 0; i < storesize; i++)
floatData[i] = (float)image[i];
XVImage<float> newImage(nrows, ncols, floatData
delete floatData;
return newImage;
}
#endif
};
#endif Image_hh
And the lines where is implemented in another file is:
template <class T> XVImage<T> &operator >>(const ColVector &x,XVImage<T> &y);
template <class T> XVImage<T> &operator >>(const RowVector &x,XVImage<T> &y);
Can anyboby help me?
Sorry for my english
Thanks.
next reply other threads:[~2001-04-02 7:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-02 7:20 jpyubero [this message]
2001-04-02 21:00 ` Alexandre Oliva
[not found] <2F05A390F72A0A409390E016D23E45E8042DBE10@ns-bco-mse4.im.battelle.org>
2002-10-09 11:46 ` template problem andy
-- strict thread matches above, loose matches on Subject: below --
2002-10-09 9:33 andy
2002-10-09 10:18 ` Eljay Love-Jensen
1999-12-28 13:11 Template problem Michael Ben-Gershon
1999-12-31 22:24 ` Michael Ben-Gershon
2000-01-02 4:22 ` Alex Vinokur
2000-04-01 0:00 ` Alex Vinokur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AC88C48.EEC7AFDB@elai.upm.es \
--to=gva09@elai.upm.es \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).