Click here to Skip to main content
15,908,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What CWinThread is pointed to by AfxGetApp Pin
Richard MacCutchan10-Jun-12 22:01
mveRichard MacCutchan10-Jun-12 22:01 
AnswerRe: What CWinThread is pointed to by AfxGetApp Pin
Erudite_Eric10-Jun-12 9:15
Erudite_Eric10-Jun-12 9:15 
GeneralRe: What CWinThread is pointed to by AfxGetApp Pin
ForNow10-Jun-12 18:26
ForNow10-Jun-12 18:26 
GeneralRe: What CWinThread is pointed to by AfxGetApp Pin
Erudite_Eric11-Jun-12 0:58
Erudite_Eric11-Jun-12 0:58 
AnswerRe: What CWinThread is pointed to by AfxGetApp Pin
Aescleal10-Jun-12 13:11
Aescleal10-Jun-12 13:11 
QuestionCallback (capAVI) and MFC doc/view Pin
Vaclav_10-Jun-12 6:17
Vaclav_10-Jun-12 6:17 
QuestionExample of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
likescr79-Jun-12 19:41
likescr79-Jun-12 19:41 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Richard MacCutchan9-Jun-12 22:17
mveRichard MacCutchan9-Jun-12 22:17 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Aescleal9-Jun-12 22:22
Aescleal9-Jun-12 22:22 
GeneralRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
likescr713-Jun-12 3:27
likescr713-Jun-12 3:27 
QuestionRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
CPallini10-Jun-12 21:06
mveCPallini10-Jun-12 21:06 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Eytukan11-Jun-12 4:42
Eytukan11-Jun-12 4:42 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Eytukan11-Jun-12 4:44
Eytukan11-Jun-12 4:44 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
jschell11-Jun-12 8:02
jschell11-Jun-12 8:02 
QuestionData Encapsulation Pin
pix_programmer8-Jun-12 21:12
pix_programmer8-Jun-12 21:12 
AnswerRe: Data Encapsulation Pin
Richard MacCutchan8-Jun-12 22:07
mveRichard MacCutchan8-Jun-12 22:07 
AnswerRe: Data Encapsulation Pin
Aescleal9-Jun-12 9:40
Aescleal9-Jun-12 9:40 
QuestionMy assignment aggregation, composition and inheritance Pin
David96378-Jun-12 19:23
David96378-Jun-12 19:23 
AnswerRe: My assignment aggregation, composition and inheritance Pin
Richard MacCutchan8-Jun-12 22:02
mveRichard MacCutchan8-Jun-12 22:02 
GeneralRe: My assignment aggregation, composition and inheritance Pin
David96379-Jun-12 0:13
David96379-Jun-12 0:13 
GeneralRe: My assignment aggregation, composition and inheritance Pin
Richard MacCutchan9-Jun-12 0:20
mveRichard MacCutchan9-Jun-12 0:20 
AnswerRe: My assignment aggregation, composition and inheritance Pin
Aescleal9-Jun-12 10:09
Aescleal9-Jun-12 10:09 
QuestionBuild error with Visual C++ 2010 Pin
Falconapollo8-Jun-12 17:10
Falconapollo8-Jun-12 17:10 
I build the following code(copy from MSDN 2008 SP1)
C++
// std_tr1__random__mersenne_twister_construct.cpp 
// compile with: /EHsc 
#include <random> 
#include <iostream> 
 
typedef std::tr1::minstd_rand Myeng; 
typedef std::tr1::mersenne_twister<unsigned int, 32, 624, 
    397, 31, 0x9908b0df, 11, 7, 0x9d2c5680, 
    15, 0xefc60000, 18> Myceng;  // same as mt19937 
int main() 
    { 
    Myeng eng; 
    Myceng ceng; 
    Myceng::result_type compval = ceng(); 
 
    compval = compval;  // to quiet "unused" warnings 
 
    std::cout << "W == " << Myceng::word_size << std::endl; 
    std::cout << "N == " << Myceng::state_size << std::endl; 
    std::cout << "M == " << Myceng::shift_size << std::endl; 
    std::cout << "R == " << Myceng::mask_bits << std::endl; 
    std::cout << "A == " << Myceng::parameter_a << std::endl; 
    std::cout << "U == " << Myceng::output_u << std::endl; 
    std::cout << "S == " << Myceng::output_s << std::endl; 
    std::cout << "B == " << Myceng::output_b << std::endl; 
    std::cout << "T == " << Myceng::output_t << std::endl; 
    std::cout << "C == " << Myceng::output_c << std::endl; 
    std::cout << "L == " << Myceng::output_l << std::endl; 
 
    std::cout << "min == " << ceng.min() << std::endl; 
    std::cout << "max == " << ceng.max() << std::endl; 
 
    ceng.seed(); // reseed base engine 
    std::cout << "a random value == " << ceng() << std::endl; 
    std::cout << "a random value == " << ceng() << std::endl; 
    std::cout << "a random value == " << ceng() << std::endl; 
 
    Myceng ceng2(eng); // construct with generator 
    ceng2.seed(eng);  // seed with generator 
 
    Myceng ceng3(5UL);  // construct with unsigned long seed 
    ceng3.seed(5UL);  // seed with unsigned long 
 
    return (0); 
    } 


with Visual Studio 2010, but the compiler reports errors:
C++
1>------ Build started: Project: Console, Configuration: Debug Win32 ------
1>Build started 2012-6-9 11:05:53.
1>InitializeBuildStatus:
1>  Touching "Debug\Console.unsuccessfulbuild".
1>ClCompile:
1>  Console.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>z:\e\disk\vc\justtest\console\console.cpp(27): warning C4003: not enough actual parameters for macro 'min'
1>z:\e\disk\vc\justtest\console\console.cpp(27): error C2059: syntax error : '('
1>z:\e\disk\vc\justtest\console\console.cpp(28): error C2039: '<<' : is not a member of 'std::tr1::mersenne_twister<_Ty,_Wx,_Nx,_Mx,_Rx,_Px,_Ux,_Sx,_Bx,_Tx,_Cx,_Lx>'
1>          with
1>          [
1>              _Ty=unsigned int,
1>              _Wx=32,
1>              _Nx=624,
1>              _Mx=397,
1>              _Rx=31,
1>              _Px=-1727483681,
1>              _Ux=11,
1>              _Sx=7,
1>              _Bx=-1658038656,
1>              _Tx=15,
1>              _Cx=-272236544,
1>              _Lx=18
1>          ]
1>z:\e\disk\vc\justtest\console\console.cpp(28): error C2039: 'ceng' : is not a member of 'std::tr1::mersenne_twister<_Ty,_Wx,_Nx,_Mx,_Rx,_Px,_Ux,_Sx,_Bx,_Tx,_Cx,_Lx>'
1>          with
1>          [
1>              _Ty=unsigned int,
1>              _Wx=32,
1>              _Nx=624,
1>              _Mx=397,
1>              _Rx=31,
1>              _Px=-1727483681,
1>              _Ux=11,
1>              _Sx=7,
1>              _Bx=-1658038656,
1>              _Tx=15,
1>              _Cx=-272236544,
1>              _Lx=18
1>          ]
1>z:\e\disk\vc\justtest\console\console.cpp(28): warning C4003: not enough actual parameters for macro 'max'
1>z:\e\disk\vc\justtest\console\console.cpp(28): error C2059: syntax error : '('
1>z:\e\disk\vc\justtest\console\console.cpp(30): error C2039: 'ceng' : is not a member of 'std::tr1::mersenne_twister<_Ty,_Wx,_Nx,_Mx,_Rx,_Px,_Ux,_Sx,_Bx,_Tx,_Cx,_Lx>'
1>          with
1>          [
1>              _Ty=unsigned int,
1>              _Wx=32,
1>              _Nx=624,
1>              _Mx=397,
1>              _Rx=31,
1>              _Px=-1727483681,
1>              _Ux=11,
1>              _Sx=7,
1>              _Bx=-1658038656,
1>              _Tx=15,
1>              _Cx=-272236544,
1>              _Lx=18
1>          ]
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:04.00
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


Any one can help?
AnswerRe: Build error with Visual C++ 2010 Pin
Richard MacCutchan8-Jun-12 22:53
mveRichard MacCutchan8-Jun-12 22:53 
GeneralRe: Build error with Visual C++ 2010 Pin
Falconapollo8-Jun-12 23:05
Falconapollo8-Jun-12 23:05 

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.