Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiongenetic algorithm Pin
manimekalai198816-Feb-10 18:02
manimekalai198816-Feb-10 18:02 
AnswerRe: genetic algorithm Pin
vkpMark16-Feb-10 18:25
vkpMark16-Feb-10 18:25 
AnswerRe: genetic algorithm Pin
vkpMark16-Feb-10 18:30
vkpMark16-Feb-10 18:30 
QuestionBy default run an exe in run as admin mode using MFC Pin
Abinash Mohanty16-Feb-10 17:53
Abinash Mohanty16-Feb-10 17:53 
AnswerRe: By default run an exe in run as admin mode using MFC Pin
«_Superman_»16-Feb-10 18:34
professional«_Superman_»16-Feb-10 18:34 
GeneralRe: By default run an exe in run as admin mode using MFC Pin
Abinash Mohanty16-Feb-10 20:10
Abinash Mohanty16-Feb-10 20:10 
GeneralRe: By default run an exe in run as admin mode using MFC Pin
BIJU Manjeri16-Feb-10 20:32
BIJU Manjeri16-Feb-10 20:32 
GeneralRe: By default run an exe in run as admin mode using MFC Pin
«_Superman_»16-Feb-10 20:38
professional«_Superman_»16-Feb-10 20:38 
GeneralRe: By default run an exe in run as admin mode using MFC Pin
Abinash Mohanty16-Feb-10 21:51
Abinash Mohanty16-Feb-10 21:51 
GeneralRe: By default run an exe in run as admin mode using MFC Pin
«_Superman_»16-Feb-10 22:29
professional«_Superman_»16-Feb-10 22:29 
Questiongenerate normal deviates distribution with mean and standard deviation Pin
mrby12316-Feb-10 12:00
mrby12316-Feb-10 12:00 
AnswerRe: generate normal deviates distribution with mean and standard deviation Pin
Gregorio Sanchez16-Feb-10 21:03
Gregorio Sanchez16-Feb-10 21:03 
QuestionNetbeans C++ Sqlite3 Pin
xivShin16-Feb-10 4:34
xivShin16-Feb-10 4:34 
AnswerRe: Netbeans C++ Sqlite3 Pin
Richard MacCutchan16-Feb-10 5:06
mveRichard MacCutchan16-Feb-10 5:06 
GeneralRe: Netbeans C++ Sqlite3 Pin
xivShin16-Feb-10 5:09
xivShin16-Feb-10 5:09 
GeneralRe: Netbeans C++ Sqlite3 Pin
Richard MacCutchan16-Feb-10 6:00
mveRichard MacCutchan16-Feb-10 6:00 
GeneralRe: Netbeans C++ Sqlite3 Pin
loyal ginger16-Feb-10 6:39
loyal ginger16-Feb-10 6:39 
AnswerRe: Netbeans C++ Sqlite3 Pin
sashoalm16-Feb-10 5:06
sashoalm16-Feb-10 5:06 
GeneralRe: Netbeans C++ Sqlite3 Pin
Richard MacCutchan16-Feb-10 8:10
mveRichard MacCutchan16-Feb-10 8:10 
AnswerRe: Netbeans C++ Sqlite3 Pin
CPallini16-Feb-10 11:15
mveCPallini16-Feb-10 11:15 
GeneralRe: Netbeans C++ Sqlite3 Pin
xivShin16-Feb-10 18:44
xivShin16-Feb-10 18:44 
GeneralRe: Netbeans C++ Sqlite3 Pin
CPallini16-Feb-10 20:53
mveCPallini16-Feb-10 20:53 
QuestionStatic Const Initialization Pin
Skippums16-Feb-10 3:17
Skippums16-Feb-10 3:17 
AnswerRe: Static Const Initialization Pin
«_Superman_»16-Feb-10 3:32
professional«_Superman_»16-Feb-10 3:32 
GeneralRe: Static Const Initialization Pin
Skippums16-Feb-10 3:36
Skippums16-Feb-10 3:36 
Yes, I saw that post in my quest for a solution, but I can't figure out how to go about initializing the members based on template specialization. Any ideas?

Oh, I also get the compiler error C2057 when I move all of the non-specialized declarations within the structure definition. In other words, I attempted the following:
// Template structures used to get information about IEEE floating-point formats
template<size_t bytes> struct __float {
public:
    // Mantissa size, in bits
    static const __uint8  MantissaSize;
    // Significand size, in bits
    static const __uint8  SignificandSize = MantissaSize + 1;
    // Exponent size, in bits
    static const __uint8  ExponentSize    = (bytes << 3) - SignificandSize;
    // The maximum representable exponent (reserved for inf and NaN)
    static const __uint16 ExponentMax = (1 << ExponentSize) - 1;
    // The exponent bias
    static const __uint16 ExponentBias = ExponentMax >> 1;
    // An integer with only the bit left of the mantissa set
    static const __int64 SignificandBit = 1LL << MantissaSize;
    // An integer with all bits included in the mantissa set
    static const __int64 MantissaMask = SignificandBit - 1;
    static const __int64 SignificandMask = SignificandBit | MantissaMask;
    // An integer with all bits included in the exponent set
    static const __int64 ExponentMask = static_cast<__int64>(ExponentMax) << MantissaSize;
};
    
// Defines the constants used by the __float structure
template<> const __uint8 __float< 2>::MantissaSize =  10;
template<> const __uint8 __float< 4>::MantissaSize =  23;
template<> const __uint8 __float< 8>::MantissaSize =  52;
This resulted in a number of C2057 errors about expecting a constant expression. I must be misinterpreting your recommendation, because I can't figure out how to make such a thing compile. Thanks for any additional help,
Sounds like somebody's got a case of the Mondays

-Jeff
modified on Tuesday, February 16, 2010 9:45 AM

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.