This is transposing matrix program that  I wrote using mpi.
#include <stdio.h>
#include <iostream>
#include <mpi.h>
#include <iomanip>
using namespace std;
int main(int argc,char*argv[])
      int myrank, nproc;
      int   nlocal=3;
      int i;
      int c[3][3];
      int n=3;
      cout<<"Input matrix is:\n";
      for(i=0; i<n; i++)
            for(int j=0; j<n; j++)
                  cout<< setw(8) << c[i][j];
      int a[3];
      int b[3];
      int d[3];
      MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
      for(int i=0; i<nlocal; i++)
      cout<<"\n Transpose of matrix C is:";
      for (int i=0; i<3; i++)
               cout<< setw(8) << d[i];
Can anyone help me?
What is wrong about this?
Its run in single machine.
Is process with rank 1 and 2 execute and if yes why array d does not print out for them?
When I put if (myrank ==2)print something, nothing happened.
Where is the problem?
1.from code
2.from machine
3.from visual studio 2008
Thanks very much for  your any help.
I attach error message and output window files.
Best Regards.