Re: using std templates with xCode
Re: using std templates with xCode
- Subject: Re: using std templates with xCode
- From: Pavol Markovic <email@hidden>
- Date: Tue, 5 Oct 2004 07:52:10 +0200
Hi, have you #included needed header files <vector>?
Isn't std::vector declared all in lowercase?
Have you "using namespace std;" in your header file?
PM
On 5.10.2004, at 2:13, Ken Hawkins wrote:
Got a class that is defined as such:
template <class Numeric> class fir
{
public:
long num_taps;
Numeric* coeff;
// protected:
Numeric* z;
Numeric output;
public:
...
friend Vector<Numeric> Vector_taps(fir<Numeric> x);
friend Vector<Numeric> Vector_input(fir<Numeric> y);
void settap(Vector<Numeric> z) {
for (int i=0;i<num_taps;i++) coeff[i] = z[i];
}
};
when compiling under Xcode (C++ tool) command line utility it gives me
these errors:
/Developer/projects/learning/DSP/spux/generic/fir.h:106: warning: ISO
C++ forbids declaration of `Vector' with no type
/Developer/projects/learning/DSP/spux/generic/fir.h:106: error:
template-id `Vector<Numeric>' used as a declarator
/Developer/projects/learning/DSP/spux/generic/fir.h:106: error:
`Vector' is neither function nor member function; cannot be declared
friend
I know there is a flag that i need to set just can't remember what it
is and can't search the archives. anyone?
thanks,
ken; _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden