Quick question on arguments

Mar 15, 2013 at 1:17am
I have a question that asks me why does the order of arguments matter? I have looked and looked but I can't seem to find it.

Any help would be great.
Mar 15, 2013 at 1:48am
I'm not too up on my terminology, so I don't know the term "arguments"

but as far as order goes:

1
2
3
4
int num;
num = 0;
num++;
num = 3;


3


is different from

1
2
3
4
int num;
num = 0;
num = 3;
num++;


4


and

1
2
3
4
int num;
num = 3;
num++;
num = 0;


0


and

1
2
3
4
num = 3;
num++;
num = 0;
int num;


won't compile
Mar 15, 2013 at 1:55am
Well I'm almost 100% sure that this would be a function with a argument insideFunctionName(this, is, an, argument)
Last edited on Mar 15, 2013 at 1:55am
Mar 15, 2013 at 1:58am
Aw jank. Yeaahh. In that case, the order matters because thats the order you have to pass it through.

Function(int, char, string)

in this case, youll have trouble if you try passing through

Function(c, this is a string, 56)

Mar 15, 2013 at 2:00am
Ah ok, thanks. I really appreciate it.
Mar 15, 2013 at 2:01am
also

Function(int a, int b, int c)

if you pass through Function(3,6,8)

inside the function:
a = 3
b = 6
c = 8

because thats the order you passed it in
Mar 15, 2013 at 2:08am
sure! np.
Topic archived. No new replies allowed.