Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: Strange err...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3722 of 3840
Post > Topic >>

Re: Strange error message....

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.
 




 2 Posts in Topic:
Strange error message....
SpreadTooThin <bjobrie  2008-04-25 17:48:19 
Re: Strange error message....
David Phillip Oster <o  2008-04-25 20:14:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 0:35:49 CDT 2008.