What will the i++ do in here? Easy i++?

I saw this codes from somewhere and don't really get it..
I know when i is smaller than argc, then it will keep on looping. Then if the present argv is phone number, then phone should read the present argv? I just don't see the point why we need to put i++ in argv[]? wouldn't it read next argv?
1
2
3
4
5
6
7
8
9
10
11
12
while (i<argc)
	{
		if(isphone(argv[i]))
		{
			
			phone = argv[i++];
		}
		else if (isemail(argv[i]))
		{	
			i++;
			email = argv[i++];
		}
No, google "post increment".
that is to say:
j=i++;
equal to
1
2
 j=i;
++i;

or
1
2
j=i;
i++;

BTW: we always say C++ , not ++C. cause Cplusplus must equal to C first.
Topic archived. No new replies allowed.