Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~382 People Reached
Favorite Forums
Favorite Tags
c++ x 18
Member Avatar for khalidxa

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 …

Member Avatar for pradeepk
0
104
Member Avatar for khalidxa

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

Member Avatar for Salem
0
167
Member Avatar for khalidxa

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

Member Avatar for Lerner
0
111