Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat does it mean when...... Pin
Richard Andrew x6416-Sep-13 10:42
professionalRichard Andrew x6416-Sep-13 10:42 
AnswerRe: What does it mean when...... Pin
Graham Breach16-Sep-13 11:26
Graham Breach16-Sep-13 11:26 
GeneralRe: What does it mean when...... Pin
Richard Andrew x6416-Sep-13 11:51
professionalRichard Andrew x6416-Sep-13 11:51 
QuestionFeedback appreciated Pin
Marco Bertschi16-Sep-13 0:15
protectorMarco Bertschi16-Sep-13 0:15 
AnswerRe: Feedback appreciated Pin
pasztorpisti16-Sep-13 0:54
pasztorpisti16-Sep-13 0:54 
AnswerRe: Feedback appreciated Pin
Richard MacCutchan16-Sep-13 0:54
mveRichard MacCutchan16-Sep-13 0:54 
AnswerRe: Feedback appreciated - OT Pin
Richard MacCutchan16-Sep-13 20:39
mveRichard MacCutchan16-Sep-13 20:39 
GeneralRe: Feedback appreciated - OT Pin
SoMad16-Sep-13 21:23
professionalSoMad16-Sep-13 21:23 
GeneralRe: Feedback appreciated - OT Pin
Marco Bertschi16-Sep-13 21:59
protectorMarco Bertschi16-Sep-13 21:59 
AnswerRe: Feedback appreciated Pin
Stefan_Lang17-Sep-13 1:42
Stefan_Lang17-Sep-13 1:42 
AnswerRe: Feedback appreciated Pin
Vaclav_17-Sep-13 10:21
Vaclav_17-Sep-13 10:21 
Questiondebug begining: Unhandled exception at 0x77cf15de in blast_vib_proc.exe: 0xC00000FD: Stack overflow. Pin
mrby12314-Sep-13 16:18
mrby12314-Sep-13 16:18 
SuggestionRe: debug begining: Unhandled exception at 0x77cf15de in blast_vib_proc.exe: 0xC00000FD: Stack overflow. Pin
Richard MacCutchan14-Sep-13 21:42
mveRichard MacCutchan14-Sep-13 21:42 
AnswerRe: debug begining: Unhandled exception at 0x77cf15de in blast_vib_proc.exe: 0xC00000FD: Stack overflow. Pin
Marco Bertschi15-Sep-13 10:39
protectorMarco Bertschi15-Sep-13 10:39 
Questionas soon as start program got error message - stack overflow Pin
mrby12313-Sep-13 19:35
mrby12313-Sep-13 19:35 
AnswerRe: as soon as start program got error message - stack overflow Pin
Richard MacCutchan13-Sep-13 22:26
mveRichard MacCutchan13-Sep-13 22:26 
GeneralRe: as soon as start program got error message - stack overflow Pin
CPallini14-Sep-13 6:45
mveCPallini14-Sep-13 6:45 
AnswerRe: as soon as start program got error message - stack overflow Pin
Jochen Arndt13-Sep-13 22:32
professionalJochen Arndt13-Sep-13 22:32 
AnswerRe: as soon as start program got error message - stack overflow Pin
Erudite_Eric14-Sep-13 21:39
Erudite_Eric14-Sep-13 21:39 
SuggestionGetting forward from console applications to gui Pin
Farhan_Karim13-Sep-13 3:10
Farhan_Karim13-Sep-13 3:10 
GeneralRe: Getting forward from console applications to gui Pin
Richard MacCutchan13-Sep-13 3:44
mveRichard MacCutchan13-Sep-13 3:44 
GeneralRe: Getting forward from console applications to gui Pin
Farhan_Karim13-Sep-13 8:09
Farhan_Karim13-Sep-13 8:09 
GeneralRe: Getting forward from console applications to gui Pin
jschell13-Sep-13 11:36
jschell13-Sep-13 11:36 
AnswerRe: Getting forward from console applications to gui Pin
Marco Bertschi15-Sep-13 10:41
protectorMarco Bertschi15-Sep-13 10:41 
QuestionProblem with const struct initialization in a class Pin
Marco Bertschi13-Sep-13 2:47
protectorMarco Bertschi13-Sep-13 2:47 
Alright, I've been bugging with this one for quite a while now.
I have a struct which is const and part of a class and therefore I need to initialize it.
What I have done so far:

C++
/****************************************************************************
File: Boundaries.h
Desciption: Contains boundary structs for different data types.
Version:    1.0
Author:     MAB
****************************************************************************/
#ifndef BOUNDARIES_H
#define BOUNDARIES_H


typedef struct{
   char upper;
   char lower;
}  charBoundary; //!< Boundary struct for char data types

#endif  //BOUNDARIES_H


C++
/****************************************************************************
File: foo.h
Desciption: Test class for Boundaries.h
Version:    1.0
Author:     MAB
****************************************************************************/
#ifndef FOO
#define FOO

using namespace std;
#include <iostream>  //!< Used for console output

class foo{
   private:
   const charBoundary versionBoundary = {
        1,
        -5
    };
   public:
};


Now I recognized that the initialization

C++
const charBoundary versionBoundary = {
        1,
        -5
};


is only valid in C++11 - All compilers not supporting C++11 will choke on these lines.
Now I come to the question I want to ask:
Is there any other way to get it compilable to older compilers than making versionBoundary static or non-const or adding a constructor to the charBoundary struct?
I do not like neither of the above mentioned possibilities but if there is no other solution - What would you recommend?

Thanks in Advance
PP
You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the tallest guy in the NBA is Chinese, the Swiss hold the America's Cup, France is accusing the U.S. of arrogance, Germany doesn't want to go to war, and the three most powerful men in America are named "Bush", "Dick", and "Colon."

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.