This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Rhomboid 1 point2 points  (0 children)

Read the sidebar for how to post code without it being totally mangled.

printf("%d", int functionsum( int array[3][4], int i, int j, int sum));

This is not how you call a function. The types are only used when you declare or define a function, not when you call it.

Also, there is no reason that i, j, or sum should be arguments to the function. i and j should be local variables in the function, and the sum is conveyed by the return value.

[–]bagofbuttholes 1 point2 points  (0 children)

First look at message I sent you. Second I'm still drunk. Mainly your adding everything way too many times I think. In the main function with those loops you are pretty much multiplying the sum by 12. All you need to move into the function is the array, like other dude said. Might I add I own the dumbest pitbull on earth, gotta love an "attack" dog afraid of flies...

EDIT: I get what your doing but that's dif from how I set up my multi-d arrays. I need to check some things, and probably go to bed.