Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Execute Shell Script and Batch Files Pin
AmbiguousName11-Sep-14 0:23
AmbiguousName11-Sep-14 0:23 
GeneralRe: Execute Shell Script and Batch Files Pin
Richard MacCutchan11-Sep-14 0:31
mveRichard MacCutchan11-Sep-14 0:31 
GeneralRe: Execute Shell Script and Batch Files Pin
AmbiguousName11-Sep-14 0:49
AmbiguousName11-Sep-14 0:49 
GeneralRe: Execute Shell Script and Batch Files Pin
Richard MacCutchan11-Sep-14 1:20
mveRichard MacCutchan11-Sep-14 1:20 
Questiondeterminant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
mybm110-Sep-14 20:06
mybm110-Sep-14 20:06 
AnswerRe: determinant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
Stefan_Lang11-Sep-14 2:51
Stefan_Lang11-Sep-14 2:51 
GeneralRe: determinant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
mybm111-Sep-14 2:55
mybm111-Sep-14 2:55 
GeneralRe: determinant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
Stefan_Lang11-Sep-14 4:40
Stefan_Lang11-Sep-14 4:40 
What I meant is, check programatically the depth of your recursion. E. g. define a static counter within your recursive function, and always compare it to the maximum allowed value, like this:

C++
const int max_recursion_level = 20;
int foo(int n) {
   int result = 0;
   // define static recursion counter
   static int recursion_level = 0;
   // increment at the start of the function, before the first recursive call
   ++recursion_level;
   // safety check
   if (recursion_level > max_recursion_level)
      throw("recursion level exceeded!");

   if (n<=0)
      result = 0;
   else if (n==1)
      result = 1;
   else
      result = foo(n-1) + foo(n-2);

   // decrement counter at the end of the function, after the last recursive call
   --recursion_level;

   return result;
}


As for calculating the determinant without recursion, I am sure there are plenty of algorithms on the web if you search for it. I?ve found one in the first response to this question: http://cboard.cprogramming.com/cplusplus-programming/30001-determinant-calculation.html[^]
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: determinant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
mybm111-Sep-14 19:34
mybm111-Sep-14 19:34 
GeneralRe: determinant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
Stefan_Lang11-Sep-14 20:06
Stefan_Lang11-Sep-14 20:06 
GeneralRe: determinant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
mybm111-Sep-14 20:30
mybm111-Sep-14 20:30 
GeneralRe: determinant of matrix in c N*N dimension return process kill .I took from net can anyone help me out where exactly its making this issue and how to overcome this issue.As per my program i pass @dimensional matrix of order x=100; Pin
Stefan_Lang12-Sep-14 1:42
Stefan_Lang12-Sep-14 1:42 
QuestionReg. Printing Pin
murali_utr10-Sep-14 17:09
murali_utr10-Sep-14 17:09 
QuestionRe: Reg. Printing Pin
Richard MacCutchan10-Sep-14 21:01
mveRichard MacCutchan10-Sep-14 21:01 
Questionerror C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal Pin
kamal197710-Sep-14 8:30
kamal197710-Sep-14 8:30 
AnswerRe: error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal Pin
Graham Breach10-Sep-14 8:36
Graham Breach10-Sep-14 8:36 
GeneralThank you Very Much Graham Breach! Pin
kamal197710-Sep-14 13:11
kamal197710-Sep-14 13:11 
QuestionStrange random behavior of TB_HIDEBUTTON on Win7 Notification Toolbar buttons Pin
Will580110-Sep-14 3:47
Will580110-Sep-14 3:47 
AnswerRe: Strange random behavior of TB_HIDEBUTTON on Win7 Notification Toolbar buttons Pin
Richard MacCutchan10-Sep-14 4:05
mveRichard MacCutchan10-Sep-14 4:05 
GeneralRe: Strange random behavior of TB_HIDEBUTTON on Win7 Notification Toolbar buttons Pin
Will580110-Sep-14 6:56
Will580110-Sep-14 6:56 
QuestionMATLAB C/C++ Pin
mohamed sabri8-Sep-14 7:18
mohamed sabri8-Sep-14 7:18 
AnswerRe: MATLAB C/C++ Pin
Kenneth Haugland8-Sep-14 8:02
mvaKenneth Haugland8-Sep-14 8:02 
QuestionIs Edit and continue support available for X64 application in VS2010 ? Pin
sma123#4-Sep-14 21:01
sma123#4-Sep-14 21:01 
AnswerRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Richard MacCutchan4-Sep-14 21:15
mveRichard MacCutchan4-Sep-14 21:15 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
sma123#4-Sep-14 22:24
sma123#4-Sep-14 22:24 

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.