Click here to Skip to main content
16,012,223 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionType Conversion happens while writing to Logfile in VC++ Pin
aruzhere28-Jun-16 21:36
aruzhere28-Jun-16 21:36 
AnswerRe: Type Conversion happens while writing to Logfile in VC++ Pin
Jochen Arndt28-Jun-16 22:29
professionalJochen Arndt28-Jun-16 22:29 
AnswerRe: Type Conversion happens while writing to Logfile in VC++ Pin
Richard MacCutchan28-Jun-16 22:53
mveRichard MacCutchan28-Jun-16 22:53 
GeneralRe: Type Conversion happens while writing to Logfile in VC++ Pin
aruzhere28-Jun-16 23:04
aruzhere28-Jun-16 23:04 
GeneralRe: Type Conversion happens while writing to Logfile in VC++ Pin
Richard MacCutchan28-Jun-16 23:43
mveRichard MacCutchan28-Jun-16 23:43 
GeneralRe: Type Conversion happens while writing to Logfile in VC++ Pin
aruzhere29-Jun-16 2:24
aruzhere29-Jun-16 2:24 
GeneralRe: Type Conversion happens while writing to Logfile in VC++ Pin
aruzhere29-Jun-16 2:42
aruzhere29-Jun-16 2:42 
QuestionopenMP loop and exception Pin
Joerg Michels27-Jun-16 23:38
Joerg Michels27-Jun-16 23:38 
Hi all,

I have a for loop parallelized with openMP. Inside I want to catch possible exceptions. My idea is that the caught exception should be a private variable, as it is possible that several exception occur parallel. But I cannot express this.

example:

C#
#pragma omp parallel for default(none)
for ( int i = 0; i < 10; ++ i )
{
	try
	{
		// do something ...
	}
	catch ( const std::exception&	e )
	{
		e;
		// handle exception ...
	}
}

This yields to compiler error:
C#
error C3052: 'e' : variable doesn't appear in a data-sharing clause under a default(none) clause

But I cannot mark the exception variable as private, as I is not known at that scope.

I can bypass the compiler error by changing the default sharing behaviour to shared, but I think this could lead to a runtime error, if two exceptions occur at the same time.


What is the correct way to deal with this?


Thanks in advance,
Joerg


QuestionHeap Corruption issue Pin
Ben Aldhouse21-Jun-16 10:27
Ben Aldhouse21-Jun-16 10:27 
QuestionRe: Heap Corruption issue Pin
David Crow21-Jun-16 10:47
David Crow21-Jun-16 10:47 
AnswerRe: Heap Corruption issue Pin
Ben Aldhouse21-Jun-16 12:45
Ben Aldhouse21-Jun-16 12:45 
QuestionWinsock - FD_WRITE Pin
Vijjuuu.21-Jun-16 4:54
Vijjuuu.21-Jun-16 4:54 
AnswerRe: Winsock - FD_WRITE Pin
David Crow21-Jun-16 7:19
David Crow21-Jun-16 7:19 
GeneralRe: Winsock - FD_WRITE Pin
Vijjuuu.21-Jun-16 8:04
Vijjuuu.21-Jun-16 8:04 
GeneralRe: Winsock - FD_WRITE Pin
David Crow21-Jun-16 8:12
David Crow21-Jun-16 8:12 
GeneralRe: Winsock - FD_WRITE Pin
Vijjuuu.21-Jun-16 8:21
Vijjuuu.21-Jun-16 8:21 
GeneralRe: Winsock - FD_WRITE Pin
David Crow21-Jun-16 9:19
David Crow21-Jun-16 9:19 
AnswerRe: Winsock - FD_WRITE Pin
Member 1260667928-Jun-16 20:47
Member 1260667928-Jun-16 20:47 
QuestionDLL files from wmi Pin
Member 1253112919-Jun-16 22:10
Member 1253112919-Jun-16 22:10 
AnswerRe: DLL files from wmi Pin
Jochen Arndt19-Jun-16 22:30
professionalJochen Arndt19-Jun-16 22:30 
QuestionPrint class Members? Pin
bosfan16-Jun-16 5:29
bosfan16-Jun-16 5:29 
AnswerRe: Print class Members? Pin
Maximilien16-Jun-16 5:41
Maximilien16-Jun-16 5:41 
QuestionRe: Print class Members? Pin
David Crow16-Jun-16 6:12
David Crow16-Jun-16 6:12 
AnswerRe: Print class Members? Pin
bosfan5-Aug-16 4:24
bosfan5-Aug-16 4:24 
AnswerRe: Print class Members? Pin
David Crow5-Aug-16 4:27
David Crow5-Aug-16 4:27 

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.