Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / April 2008



Tip: Looking for answers? Try searching our database.

Strange error message....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SpreadTooThin - 26 Apr 2008 01:48 GMT
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?
David Phillip Oster - 26 Apr 2008 04:14 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.