Click here to Skip to main content
15,896,118 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: eliminating lag from a chess clock Pin
Alexander Kindel18-Dec-18 14:41
Alexander Kindel18-Dec-18 14:41 
GeneralRe: eliminating lag from a chess clock Pin
Daniel Pfeffer18-Dec-18 20:27
professionalDaniel Pfeffer18-Dec-18 20:27 
QuestionWiFi Notifications [SOLVED] Pin
Richard Andrew x6414-Dec-18 16:13
professionalRichard Andrew x6414-Dec-18 16:13 
QuestionVC++ Word automation issues on Win 10 Pin
narasingubhanu14-Dec-18 2:25
narasingubhanu14-Dec-18 2:25 
AnswerRe: VC++ Word automation issues on Win 10 Pin
Richard MacCutchan14-Dec-18 4:47
mveRichard MacCutchan14-Dec-18 4:47 
GeneralRe: VC++ Word automation issues on Win 10 Pin
narasingubhanu14-Dec-18 19:04
narasingubhanu14-Dec-18 19:04 
QuestionInitializing struct (in C++) Pin
Vaclav_12-Dec-18 6:22
Vaclav_12-Dec-18 6:22 
AnswerRe: Initializing struct (in C++) Pin
leon de boer12-Dec-18 6:28
leon de boer12-Dec-18 6:28 
You have either set the C++ standard flags low or the default on your compiler is not c11++ or greater
I have no issue with GCC or VS2017 taking structs like that.

try the flag
-std=c++11

or I would probably try and see if it is available
-std=c++20

BTW if it is actually a C file you need different flag .. I know you were playing with C files before
-std=c11

Now that I think about that I am guessing that is the issue you are compiling C files with G++ .. don't Smile | :)
Setup your make file to send C files to the c compiler gcc, you can make a rule based on the extension .c vs .cpp

.c files => gcc
.cpp files => g++

Visual Studio actually does exactly that it uses the filename extension to decide on c vs c++ compiling, which is why it works on it.
In vino veritas


modified 12-Dec-18 12:51pm.

QuestionList HDD files in CListView Pin
_Flaviu11-Dec-18 1:22
_Flaviu11-Dec-18 1:22 
AnswerRe: List HDD files in CListView Pin
Richard MacCutchan11-Dec-18 6:00
mveRichard MacCutchan11-Dec-18 6:00 
GeneralRe: List HDD files in CListView Pin
_Flaviu11-Dec-18 7:52
_Flaviu11-Dec-18 7:52 
GeneralRe: List HDD files in CListView Pin
Richard MacCutchan11-Dec-18 22:01
mveRichard MacCutchan11-Dec-18 22:01 
SuggestionRe: List HDD files in CListView Pin
David Crow11-Dec-18 13:27
David Crow11-Dec-18 13:27 
GeneralRe: List HDD files in CListView Pin
_Flaviu11-Dec-18 22:36
_Flaviu11-Dec-18 22:36 
SuggestionRe: List HDD files in CListView Pin
David Crow12-Dec-18 2:53
David Crow12-Dec-18 2:53 
GeneralRe: List HDD files in CListView Pin
_Flaviu12-Dec-18 23:15
_Flaviu12-Dec-18 23:15 
QuestionDriving Ctatic::DrawItem Pin
ForNow10-Dec-18 15:16
ForNow10-Dec-18 15:16 
AnswerRe: Driving Ctatic::DrawItem Pin
ForNow11-Dec-18 15:58
ForNow11-Dec-18 15:58 
Question有什么学习途径 Pin
Member 140765679-Dec-18 20:30
Member 140765679-Dec-18 20:30 
SuggestionRe: What is the learning path? Pin
Richard Deeming11-Dec-18 1:09
mveRichard Deeming11-Dec-18 1:09 
QuestionAfxMessage doesn’t block Pin
ForNow6-Dec-18 2:02
ForNow6-Dec-18 2:02 
AnswerRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 5:22
Victor Nijegorodov6-Dec-18 5:22 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 5:26
ForNow6-Dec-18 5:26 
GeneralRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 8:45
Victor Nijegorodov6-Dec-18 8:45 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 8:49
ForNow6-Dec-18 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.