Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCalling a web service from Visual C++ 2008 native Pin
Hadi Dayvary11-Sep-14 3:09
professionalHadi Dayvary11-Sep-14 3:09 
QuestionExecute Shell Script and Batch Files Pin
AmbiguousName10-Sep-14 23:37
AmbiguousName10-Sep-14 23:37 
AnswerRe: Execute Shell Script and Batch Files Pin
Richard MacCutchan10-Sep-14 23:47
mveRichard MacCutchan10-Sep-14 23:47 
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 
<blockquote class="quote"><div class="op">Quote:</div>float determinant1(float **a,int n)
{
    int i,j,j1,j2 ;                    // general loop and matrix subscripts
    float det = 0 ;                   // init determinant
    float **m = NULL ;                // pointer to pointers to implement 2d
                                       // square array

    if (n < 1)    {   }                // error condition, should never get here

    else if (n == 1) {                 // should not get here
        det = a[0][0] ;
        }

    else if (n == 2)  {                // basic 2X2 sub-matrix determinate
                                       // definition. When n==2, this ends the
        det = a[0][0] * a[1][1] - a[1][0] * a[0][1] ;// the recursion series
        }


                                       // recursion continues, solve next sub-matrix
    else {                             // solve the next minor by building a
                                       // sub matrix
        det = 0 ;                      // initialize determinant of sub-matrix

                                           // for each column in sub-matrix
        for (j1 = 0 ; j1 < n ; j1++) {
                                           // get space for the pointer list
            m = (float **) malloc((n-1)* sizeof(float *)) ;

            for (i = 0 ; i < n-1 ; i++)
                m[i] = (float *) malloc((n-1)* sizeof(float)) ;
                       //     i[0][1][2][3]  first malloc
                       //  m -> +  +  +  +   space for 4 pointers
                       //       |  |  |  |          j  second malloc
                       //       |  |  |  +-> _ _ _ [0] pointers to
                       //       |  |  +----> _ _ _ [1] and memory for
                       //       |  +-------> _ a _ [2] 4 doubles
                       //       +----------> _ _ _ [3]
                       //
                       //                   a[1][2]
                      // build sub-matrix with minor elements excluded
            for (i = 1 ; i < n ; i++) {
                j2 = 0 ;               // start at first sum-matrix column position
                                       // loop to copy source matrix less one column
                for (j = 0 ; j < n ; j++) {
                    if (j == j1) continue ; // don't copy the minor column element

                    m[i-1][j2] = a[i][j] ;  // copy source element into new sub-matrix
                                            // i-1 because new sub-matrix is one row
                   // printf("\n%f  %f",m[i-1][j2]);                       // (and column) smaller with excluded minors
                    j2++ ;                  // move to next sub-matrix column position
                    }
                }

              
             det += pow(-1.0,1.0 + j1 + 1.0) * a[0][j1] * determinant1(m,n-1) ;
              printf("\n%f",det);
                                            // sum x raised to y power
                                            // recursively get determinant of next
                                            // sub-matrix which is now one
                                            // row & column smaller

            for (i = 0;i<n-1;i++) free(m[i]) ;// free the storage allocated to
                                            // to this minor's set of pointers
            free(m) ;                       // free the storage for the original
                                            // pointer to pointer
        }
    }
    return(det) ;
}  

</blockquote>

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 
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 

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.