Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-07-08 11:13:02
Point:500 Replies:6 POST_ID:828564USER_ID:11059
Topic:
C++ Programming Language;;Java Programming Language
When I run my cpp program, I get the following error at include file afx.h
Could it be resolved, Please advise ?
c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1111): error C2059: syntax error : 'generic'
1>c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1111): error C3805: 'generic': unexpected token, expected either '}' or a ','
1>c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1145): error C2059: syntax error : 'generic'
1>c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1145): error C3805: 'generic': unexpected token, expected either '}' or a ','
Could it be resolved, Please advise ?
c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1111): error C2059: syntax error : 'generic'
1>c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1111): error C3805: 'generic': unexpected token, expected either '}' or a ','
1>c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1145): error C2059: syntax error : 'generic'
1>c:Program FilesMicrosoft Visual Studio 10.0VCincludeafx.h(1145): error C3805: 'generic': unexpected token, expected either '}' or a ','
Attachment:AFX.H
Expert: JARmod101 replied at 2024-07-24 06:22:11
Changed grade from 'C' to 'A'.
Thank you for using Experts Exchange.
JARmod101
Community Support Moderator
Thank you for using Experts Exchange.
JARmod101
Community Support Moderator
Expert: evilrix replied at 2024-07-20 09:07:44
duncanb7,
Apologies for not responding to your follow up question; I didn't have time to post a response at the time when I viewed and was going to get back to it but it looks like it slipped off my radar. Not making excuses but if you'd pinged me rather than just closing the question with a C grade I'd have got back to it. I don't bite (despite the name) and am alway happy to assist.
That said, it was incidental to the original question, which I believe was answered correctly. So, either way, the grade isn't really appropriate. Still, it seems I could have handled things a little better so let's see if I can make up for my tardiness by providing with an answer now...
The 'generic' keyword, it is not part of standard C++; rather, it is a Microsoft extension for Managed C++. Since your code is unmanaged C++ the term 'generic' has no special meaning and will generate no errors if used as a symbol. In Managed C++ it does have a special meaning so if you try to build the code as managed code you'll see an error as you are using the term incorrectly.
I hope that makes some sence and answers your follow-up question.
Apologies for not responding to your follow up question; I didn't have time to post a response at the time when I viewed and was going to get back to it but it looks like it slipped off my radar. Not making excuses but if you'd pinged me rather than just closing the question with a C grade I'd have got back to it. I don't bite (despite the name) and am alway happy to assist.
That said, it was incidental to the original question, which I believe was answered correctly. So, either way, the grade isn't really appropriate. Still, it seems I could have handled things a little better so let's see if I can make up for my tardiness by providing with an answer now...
The 'generic' keyword, it is not part of standard C++; rather, it is a Microsoft extension for Managed C++. Since your code is unmanaged C++ the term 'generic' has no special meaning and will generate no errors if used as a symbol. In Managed C++ it does have a special meaning so if you try to build the code as managed code you'll see an error as you are using the term incorrectly.
I hope that makes some sence and answers your follow-up question.
Expert: JARmod101 replied at 2024-07-20 04:07:24
duncanb7,
evilrix has asked (at http://www.experts-exchange.com/R_8903.html) for an explanation of the grade they received for this question. Please read the Grading Tips, available at http://www.experts-exchange.com/help/viewHelpPage.jsp?helpPageID=26, and then re-consider the grade you have awarded.
In general:
An 'A' grade should be awarded, unless you have a good reason otherwise. For example, if you requested additional information or clarification from the Expert, but received no response, then a 'B' grade is acceptable. If an answer seems vague, incomplete or you cannot understand it, please ask the Experts for additional clarification *before* closing your question.
A 'C' grade is unacceptable if an Expert simply posted a comment in order to start a dialogue. For example, an Expert may have asked you further questions about your setup in order to build up a picture of your environment. You are not obliged to accept such a comment as an answer to the question, since it is not a solution, and does not add any useful information to EE's Solution database.
Please note, that in the following situation, a 'C' grade may be the acceptable grade to award:
*You have given the Experts ample time to respond to your clarification posts, taking into account the fact that we are all volunteers, and cannot spend all our time on Experts Exchange
*There are no pending Expert suggestions or requests for information.
*If, after you have done this, the answers provided by the Experts lack finality and clarity, or do not address the issue, a 'C' grade is an option.
Please also remember that an answer of "You can't do that" is sometimes the only answer to a question. If that is in fact the answer, it should be accepted as the solution, with a grade, as per the above guidelines, awarded.
Please respond to this request within the next 4 days with an explanation of the grade you awarded here. After this time, a Moderator will re-review this question, and may change the grade as they see fit. If you wish for the grade to be changed, please also indicate that here, and a Moderator will help you.
Thank you,
JARmod101
Community Support Moderator
evilrix has asked (at http://www.experts-exchange.com/R_8903.html) for an explanation of the grade they received for this question. Please read the Grading Tips, available at http://www.experts-exchange.com/help/viewHelpPage.jsp?helpPageID=26, and then re-consider the grade you have awarded.
In general:
An 'A' grade should be awarded, unless you have a good reason otherwise. For example, if you requested additional information or clarification from the Expert, but received no response, then a 'B' grade is acceptable. If an answer seems vague, incomplete or you cannot understand it, please ask the Experts for additional clarification *before* closing your question.
A 'C' grade is unacceptable if an Expert simply posted a comment in order to start a dialogue. For example, an Expert may have asked you further questions about your setup in order to build up a picture of your environment. You are not obliged to accept such a comment as an answer to the question, since it is not a solution, and does not add any useful information to EE's Solution database.
Please note, that in the following situation, a 'C' grade may be the acceptable grade to award:
*You have given the Experts ample time to respond to your clarification posts, taking into account the fact that we are all volunteers, and cannot spend all our time on Experts Exchange
*There are no pending Expert suggestions or requests for information.
*If, after you have done this, the answers provided by the Experts lack finality and clarity, or do not address the issue, a 'C' grade is an option.
Please also remember that an answer of "You can't do that" is sometimes the only answer to a question. If that is in fact the answer, it should be accepted as the solution, with a grade, as per the above guidelines, awarded.
Please respond to this request within the next 4 days with an explanation of the grade you awarded here. After this time, a Moderator will re-review this question, and may change the grade as they see fit. If you wish for the grade to be changed, please also indicate that here, and a Moderator will help you.
Thank you,
JARmod101
Community Support Moderator
Author: duncanb7 replied at 2024-07-19 22:33:42
Thanks for your reply
Author: duncanb7 replied at 2024-07-12 00:26:35
So what is meaning for generic, what purpose. If no useful, why it declare generic ?
Accepted Solution
Expert: evilrix replied at 2024-07-08 13:59:48
500 points EXCELLENT
Are you trying to compile this as managed code? I think the word "generic" is a keyword in managed C++, used to define a "generic class".
http://msdn.microsoft.com/en-us/library/skef48fy.aspx
Try compiling it as a stardard C++ project (where the term "generic" has no special meaning).
http://msdn.microsoft.com/en-us/library/skef48fy.aspx
Try compiling it as a stardard C++ project (where the term "generic" has no special meaning).