Answered by:
Simple syntax error c2059 & c3805 combined for one line of code in "binary_log_types.h" -need some guide

-
Dear VS expert out there:
Simple syntax error c2059 & c3805 on one source code line from the library is causing so much confusion.
Researched through google and Window Edge, could not find any hint to resolve the problem I faced as below:
Thanking you in advance,
CBO
typedef enum enum_field_types {
….
….
56 MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
57 MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
58 MYSQL_TYPE_BIT= ,
59 MYSQL_TYPE_TIMESTAMP= ,
60 MYSQL_TYPE_DATETIME= ,
61 MYSQL_TYPE_TIME= ,
62
63 MYSQL_TYPE_JSON= ,
….
….
} enum_field_types;
1>c:\users\chanb\documents\programming\common code\binary_log_types.h(58): error C2059: syntax error: ','
1>c:\users\chanb\documents\programming\common code\binary_log_types.h(58): error C3805: ',': unexpected token, expected either '}' or a ','
cbo
Question
Answers
-
Hi poosung,
According to your description, this issue may be caused by your code. Please refer to my following code:
#define MON 1 #define TUE 2 #define WED 3 #define THU 4 #define FRI 5 #define SAT 6 #define SUN 7 typedef enum workday { saturday, sunday = 0, monday, tuesday, wednesday, thursday, friday } workday;
Please make sure all letters have been typed in English :)
And whether your issue is the same as your previous thread with the following link ? I suggest that you type the code manually.
Sincerely,
Oscar
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Edited by qing__Moderator Wednesday, January 18, 2017 5:07 AM
- Marked as answer by poosung Wednesday, January 18, 2017 12:39 PM
All replies
-
Hi poosung,
According to your description, this issue may be caused by your code. Please refer to my following code:
#define MON 1 #define TUE 2 #define WED 3 #define THU 4 #define FRI 5 #define SAT 6 #define SUN 7 typedef enum workday { saturday, sunday = 0, monday, tuesday, wednesday, thursday, friday } workday;
Please make sure all letters have been typed in English :)
And whether your issue is the same as your previous thread with the following link ? I suggest that you type the code manually.
Sincerely,
Oscar
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Edited by qing__Moderator Wednesday, January 18, 2017 5:07 AM
- Marked as answer by poosung Wednesday, January 18, 2017 12:39 PM
-
Hi, Oscar,
What a clear example you showed me. I did get the hint, and so, I put "0" without quote mark
and a comma following. e.g. MYSQL_TYPE_JSON= 0,
MYSQL_TYPE_NEWDECIMAL= 0,
MYSQL_TYPE_ENUM= 0,
MYSQL_TYPE_SET= 0,I think compiler took it ok. But I am not sure this header from MYSQL will work with this
correction. Anyway, great guide for which I thank you very much.
cbo
-
Hi poosung,
This forum is talking about some questions about how to use Visual Studio.
>>But I am not sure this header from MYSQL will work with this correction.
I suggest you could post this question to the C++ forum:
Visual Studio Languages, Windows Desktop Development > Visual C++
I think this forum will give you a professional answer :)
Sincerely,
Oscar
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.