Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to show time on form. for that i mentioned hfile time.h, at the time of compilation it is giving errors such as
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.h(175) : error C2337: 'SA_Pre' : attribute not found
fdssf


1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.h(175) : error C2065: 'SA_No' : undeclared identifier
1> missing quotes ("") around 'SA_No'?
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.h(175) : error C2337: 'SA_Pre' : attribute not found
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.h(175) : error C2065: 'SA_Yes' : undeclared identifier
1> missing quotes ("") around 'SA_Yes'?
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.h(175) : error C2065: 'SA_Read' : undeclared identifier

is there any other hfile i have to mention or what to do .
please help me in getting out of this.
Posted
Comments
Richard MacCutchan 30-Dec-13 5:24am    
Please show all the headers you have in your source file, and what order they are in. It is possible that this may be resolved by rebuilding your project.

1 solution

you have a macro defined which resolves to this error. It looks like a enum of "SA_No" to "SA_Read". You should find such text somewhere in your code.
 
Share this answer
 
Comments
Stefan_Lang 17-Jan-14 4:03am    
Agreed. I'm 99% sure this is caused by either a macro definition or globally defined enum.

Solutions:
1. don't use macro*
2. use a namespace
3. prefer local over global definitions

*: ever!
KarstenK 17-Jan-14 5:00am    
Your totally right, but macros are very powerful tool, but I know that power is dangerous. So I use them only sometimes. Most for platform issues as WIN64.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900