by David Phillip Oster <oster@[EMAIL PROTECTED]
>
Apr 25, 2008 at 08:14 PM
In article
<e88ebf42-916c-4711-af1b-4ac1efa92868@[EMAIL PROTECTED]
>,
SpreadTooThin <bjobrien62@[EMAIL PROTECTED]
> wrote:
> Trying to build an iPhone app...
> I am getting an error message:
> error: expected unqualified-id before 'template'
>
> ----> On the line below...
> template <class T>
> class Stack {
> public:
> Stack() { top = -1; }
> void push(T i)
> { st[++top] = i; }
> T pop()
> { return st[top--]; }
> private:
> int top;
> T st[100];
> };
>
> I took the file called TestApAppDelegate.m and renamed it to mm....
> this test template class was added to that file...
>
> Any idea what is going on?
Works fine for me.
If I put your code inside the
@[EMAIL PROTECTED]
AppDelegate
.... no template here ...
@[EMAIL PROTECTED]
I reproduce your error.
So, don't do that.