Click here to Skip to main content
16,005,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIs CB_FINDSTRINGEXACT unicode or ansii (mbcs)? Pin
Code-o-mat30-May-10 3:19
Code-o-mat30-May-10 3:19 
AnswerRe: Is CB_FINDSTRINGEXACT unicode or ansii (mbcs)? Pin
Aescleal30-May-10 9:32
Aescleal30-May-10 9:32 
GeneralRe: Is CB_FINDSTRINGEXACT unicode or ansii (mbcs)? Pin
Code-o-mat30-May-10 10:09
Code-o-mat30-May-10 10:09 
GeneralRe: Is CB_FINDSTRINGEXACT unicode or ansii (mbcs)? Pin
Aescleal30-May-10 10:19
Aescleal30-May-10 10:19 
GeneralRe: Is CB_FINDSTRINGEXACT unicode or ansii (mbcs)? Pin
Code-o-mat30-May-10 10:25
Code-o-mat30-May-10 10:25 
GeneralRe: Is CB_FINDSTRINGEXACT unicode or ansii (mbcs)? Pin
Aescleal30-May-10 10:29
Aescleal30-May-10 10:29 
GeneralRe: Is CB_FINDSTRINGEXACT unicode or ansii (mbcs)? Pin
Code-o-mat30-May-10 11:14
Code-o-mat30-May-10 11:14 
QuestionIs this multi-threading samples is the bug of vc6 ? Pin
wangningyu30-May-10 2:47
wangningyu30-May-10 2:47 
Why is it usually can output "main thread is running" one more, because if I don't use "/MT" option?

#include <windows.h>
#include <iostream.h>
DWORD WINAPI Fun1Proc(LPVOID lpParameter);

void main()
{
	HANDLE hThread1;
	hThread1=CreateThread(NULL,0,Fun1Proc,NULL,0,NULL);
	CloseHandle(hThread1);
	cout<<"main thread is running"<<endl;
}
DWORD WINAPI Fun1Proc(LPVOID lpParameter)
{
	cout<<"thread1 is running"<<endl;
	return 0;
}



this is the output result:
D:\Test>cl Thread.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Thread.cpp
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:Thread.exe
Thread.obj

D:\Test>Thread
main thread is running
main thread is running
thread1 is running

D:\Test>cl Thread.cpp /MT
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

Thread.cpp
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:Thread.exe
Thread.obj

D:\Test>Thread
main thread is running
thread1 is running

D:\Test>


Why should that be?
AnswerRe: Is this multi-threading samples is the bug of vc6 ? Pin
Aescleal30-May-10 9:26
Aescleal30-May-10 9:26 
AnswerRe: Is this multi-threading samples is the bug of vc6 ? Pin
Stephen Hewitt30-May-10 14:25
Stephen Hewitt30-May-10 14:25 
QuestionBringWindowToTop / Win32 Pin
Fareed Rizkalla30-May-10 2:31
Fareed Rizkalla30-May-10 2:31 
AnswerRe: BringWindowToTop / Win32 Pin
Software_Developer30-May-10 7:25
Software_Developer30-May-10 7:25 
Questionmultiplication of two arrays Pin
hasani200730-May-10 1:05
hasani200730-May-10 1:05 
AnswerRe: multiplication of two arrays Pin
Richard MacCutchan30-May-10 1:19
mveRichard MacCutchan30-May-10 1:19 
GeneralRe: multiplication of two arrays Pin
hasani200730-May-10 1:46
hasani200730-May-10 1:46 
GeneralRe: multiplication of two arrays Pin
Richard MacCutchan30-May-10 3:17
mveRichard MacCutchan30-May-10 3:17 
AnswerRe: multiplication of two arrays Pin
CPallini30-May-10 2:57
mveCPallini30-May-10 2:57 
GeneralRe: multiplication of two arrays Pin
ThatsAlok30-May-10 20:48
ThatsAlok30-May-10 20:48 
GeneralRe: multiplication of two arrays Pin
CPallini30-May-10 22:57
mveCPallini30-May-10 22:57 
AnswerRe: multiplication of two arrays Pin
ThatsAlok31-May-10 1:45
ThatsAlok31-May-10 1:45 
AnswerRe: multiplication of two arrays Pin
ThatsAlok30-May-10 20:49
ThatsAlok30-May-10 20:49 
Questionabout Operator of >> and << in the Memory-Mapping Files. Pin
lxlenovostar30-May-10 0:41
lxlenovostar30-May-10 0:41 
AnswerRe: about Operator of >> and << in the Memory-Mapping Files. Pin
Richard MacCutchan30-May-10 1:32
mveRichard MacCutchan30-May-10 1:32 
GeneralRe: about Operator of >> and << in the Memory-Mapping Files. Pin
lxlenovostar30-May-10 16:14
lxlenovostar30-May-10 16:14 
Questionsimple char array Pin
hasani200729-May-10 6:58
hasani200729-May-10 6:58 

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.