Why do I get an error before "AT_NAME"?
I am kinda new at this.
I wanted to define a type based on an enum, which has all the directions a sprite can be facing in a game I am making. I defined the enum and typedef in the header for a display file. When I put it between the @interface and @end, I got a syntax error, but when I put it after the @end, I got an error in the .m file that I think has something to do with the #import. Where is the best place to put the typedef in my program: the .m file or the .h file, and where in the file? For now I used #define about 9 times, which is annoying.
I do not want to have to make a new header file for my program.
Hi thatonegeek, and welcome to the Dev Forum!
thatonegeek wrote:
I defined the enum and typedef in the header for a display file. When I put it between the @interface and @end, I got a syntax error ...
Yes. A typedef doesn't want to be part of a class interface.
but when I put it after the @end, I got an error in the .m file that I think has something to do with the #import.
An error in a .h file will only be reported in the .m files which #import that header. Without the message text it's hard to guess what the compiler doesn't like about the typedef. One possibility is that one of the @interface declarations uses that enum type. To rule out that case, try putting the typedef above the @interface, e.g. between any #imports and the @interface directive.
Otherwise it might help to drop your typedef above main() in a minimal C program to rule out any syntax error. A period that wants to be a comma can be hard to spot until the enum is isolated. An Obj-C compile might report a different error every time we move the typedef without ever letting us know the typedef syntax itself is wrong.
Where is the best place to put the typedef in my program: the .m file or the .h file.
Typedefs belong in .h files. But as discussed above, they need to be visible wherever the type is used since AFAIK there's no standard syntax for the forward declaration of an enum type (though I think that's supported as a C extension by some compilers). If you're using Xcode, one approach would be to make the typedef visible globally by putting it in your _Prefix.pch file.
If none of the above is helpful please post the .h file in question. In that case please copy and paste directly from the source file to the forum and use + Your code here + to format your post.
- Ray
Similar Messages
-
I have a Free Agent external backup hard drive connected to my iMac Intel desktop via USB, I never unplug it. Why do I get an error message, from time to time, upon startup stating, "Disk was disconnected improperly. Always eject disk before disconnecting."?
I never unplug the external harddrive, and the error message comes up only occassionaly upon startup. Maybe the USB connection gets disrupted enough to cause the computer to see it as disconnected and then reconnected while the iMac is powered.
-
When I want to scroll through My pictures why do I get this Error message (A necessary data reference could not be resolved)
Before anyone can help, they need information to work with. Basic stuff:
- What version of iPhoto.
- What version of the Operating System.
- Details. What were you doing when the problem arose?
- Did it ever work properly?
- Are there error messages?
- What steps have you tried already to solve the issue.
Anything else you can think of that might allow someone else to understand your issue.
With this kind of information somebody can develop a starting point for troubleshooting the issue.
Posts that consist of "iPhoto doesn't work. Help" or "iPhoto won't print" or "Suddenly I have no photos!!!!!!!!!!" mean that any helper is simply guessing. With information, s/he may be able to get your issue resolved sooner. -
Why do I get an error 1004 whenever I try to download an app?
Sometimes this will work as well when you get that message. It's easy to do. Try it before you do anything else.
Go to Settings>Safari>Clear History, Cookies and Cache or Data. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button. -
why do I get an error message when I start safari 5.1 telling me I need to open browser in 32 bit mode in order to "view movie" ? This occurs when I start safari on the opening page (the page with all the boxes for most viewed web sites). This had never occurred with safari up until the latest updates to safari & OSX [Version 5.1 (6534.50)] and OSX 10.6.8.
also, I'm not trying to view a movie - this occurs for the page previews that load when safari opens.
thanks.go here:
http://get.adobe.com/shockwave/otherversions/
choose "different version">full 64 bit and download - seems to have solved probem...let you know if it happens again -
Why am I getting an error message when trying to use a template?
Why am I getting an error message when trying to use a Pages template?
You are getting an error message because there is an error.
Knowing wht version of Pages you are using, what template you are attempting to open, and what error message Pages is sending you might help determine why you are getting that specific rror message. Without those, the first sentence above i pretty much all that can be said with any assurance.
Regards,
Barry -
I went through the forums and made sure that any blocks or copywrites weren't triggered by the file, it's clean and can be opened using a media player and other video editing software like windows MovieMaker. I keep getting "The importer reported a generic error" message and have no idea how to proceed. Can someone please help?
Re: Why do I get "generic error" message when trying to upload a self-created, 1hr .wmv file?
This ARTICLE starts with a checklist on setting up a computer to run PrE best, then goes into a series of links for tuning up one's computer and OS, and then links on troubleshooting.
There is also a link on posting all necessary info, to help others help you.
Without knowing much more about your system, it is impossible to say much beyond that WMV's are tough assests to work with, requiring a lot of CPU horsepower.
Good luck,
Hunt -
Can someone please offer some suggestions why I am getting an error message that says "an unknown error has occured" when I try to download or update my apps in the app store?
Thanks!
disregard! i noticed someone else's post about signing out of the app store and signing in again and it worked.....Hi ...
Try here > Mac App Store: "An unknown error occurred (100)" when purchasing
If that doesn't help, drag the App Store icon straight up off your Dock so it goes, "poof".
Now drag the App Store icon from your Applications folder to the Dock. Try updating your apps. -
Why do I get an error message when I try to sync my IPAD with ITunes? Message reads Cannot be used because Apple Mobile Device Service has not been started.
AMDS for Windows
http://support.apple.com/kb/TS1567 -
I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?
In relation to my previous inquiry regarding inability to view a pdf file using Safari...
Is it possible that I can view other online bills from other website but not this particular bill from one specific website?
Sorry if I missed any important point in this article -->Apple Safari 5.1 and Adobe Reader/Acrobat Advisory
Thanks again! -
Why do I get this error message when I open Organizer in Photoshop Elements 11 "Elements Organizer has stopped working"? My only option is to Close Program so I am effectively locked out of my photo catalogue. I have tried reinstalling the program but it made no difference to the error message.
Could someone help please? StephHi,
Please give a try to Photoshop Elements (PSE) knowledge base. steps mentioned on this and see if it works.
Regards
Kishan -
Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.
I may have already resolved this issue buy removing the device from my computer and re-pairing it. It is currently working just fine.
-
I am able to pick 4 videos from the Photo library in my iPhoneAPP but when i try to pick 5th one it throws an error:
"More than maximum 5 filtered album lists trying to register. This will fail,Why i am getting this error when i pick video from Photo library."Hello Tate r Bulic
I don't have any idea how to remove this error,can i pick more than 5 videos from the photo library...
If it's then please help me and gimme idea..Thanks -
According to my network provider (Amaysim/Optus) Tethering is enabled, so why do I get this error message "to enable personal hotspot on this account, contact OPTUS"
Amysim/Optus support can not help.
I can not check or change any network settings (no APN settings)
I have synced phone using latest itunes (10.5.3).
Phone software is up to date (5.0.1).
Network settings have been reset.
SIM card has been taken out and put back in.
Phone has been switched off/on again.
Another sim card from virgin works ok (hotspot option is visible and can be turned on/off as required)
The Amaysim/Optus SIM card can be put into another phone (android) and tethering/hotspot works fine.
Can anyone provide solution to this nightmare?I am having the same issue although i have an iphone 5. I have contacted Live connected numerous times an tried everything imaginable to solve the issue. Is it possibly a handset issue? I cant recieve any help from optus as im with live connected, they cant help me and apple keep telling me to contact your carrier ( live connected). Seems to make me want to switch providers pretty shortly..
please let me know if you can solve your issue and maybe it can help me too.. -
Why do I get the error message: "The file "iTunes Library" cannot be read because it was created by a newer version of iTune." I am using iTunes9.1.1 which, I believe, is the highest for OS 10.4.11 ?
Hello,
Did you reinstall lately?
My 10.4.11 Drive seemes to have iTunes 7.6.2 on it, have you tried Software update to see if iTunes is listed?
Another 10.4.11 drive has iTunes 6.05 on it... I hate upgrading iTunes, seems worse at every upgrade.
The 10.5.8 drive I'm booted from now has iTunes 8.02 on it.
Maybe you are looking for
-
My iphone 5 is not showing up in itunes
i am connecting my iphone 5 to the computer and is not recognizing it. i do have the latest version of itunes so i dont know what else to do.
-
Problem with digital signature of documents
I have a requirement to upload documents and his respected fingerprint signed (SHA1WithRSA). To achive this I am using the functions modules: SSF_KRN_DIGEST SSF_KRN_SIGN_BY_AS but I can´t make it work. I also ask for the .pem file used to generate th
-
Possible bug in GDM with new user
Hi, I created a user in the system settings app in gnome and I set the password to be set at first login, but now logging out of the current user and trying to login to the new user without the password on gdm I just get nothing where 'create new UNI
-
How can I tell the date I created a DVD?
My wife has just asked me when I created a DVD for her. I stuck it in my iMac and selected "Get Info", both on the disc and later its contents but the only creation date was the present moment in time! How can I determine the time and date it was bur
-
Free dvd maker is better than encore cs4
Hi Forum, OS: Win Vista Ultimate 64bit Encore CS4 Windows DVD Maker I have shot some footage and have they in dvd pal format. I was able to create a motion menu, slide show and advd with encore cs4. i could play the dvd on pcs and normal dvd player o