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?
In article
<e88ebf42-916c-4711-af1b-4ac1efa92868@s33g2000pri.googlegroups.com>,
> Trying to build an iPhone app...
> I am getting an error message:
[quoted text clipped - 18 lines]
>
> Any idea what is going on?
Works fine for me.
If I put your code inside the
@implementation AppDelegate
... no template here ...
@end
?
I reproduce your error.
So, don't do that.