No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
Hi guys, I am working on a two dimensional array to represent a matrix. [CODE]int matrix[i][j];[/CODE] I need to swap all the values of matrix[1][1] to matrix[1][2] . I am not sure how to do the swap, I did try to use for loop and matrix[1][j+1] , but it did … | |
I have been trying to return a two dimensional array in a function but it is getting me no where, please tell me how to do it. the code is as follow : [CODE] int *population();[/CODE] [CODE]int *testCase::population() { for(int i=0;i<3;i++) { for(int j=0;j<2;j++){ matrix[i][j]=rand()%2; } } return matrix[0][0]; }[/CODE] … | |
Hi guys, I am trying to pass a two dimensional array into a constructor. I am having hard time with it. Can anyone please tell me how to pass arrays into a parameter. the code is something like this : testCase::testCase(int i, int *matrix[][],float m) Your help is appreciated Khalid |
The End.