|
|
|
|
| What could be wrong with function 1, is anything wrong with my use of sizeof(). |
myarray is of type int[] or "array of int", so the sizeof operator will return the total size of all its elements in bytes. When that array gets passed into maxOfVec, its type becomes int* or "pointer to int", despite that the function's signature would suggest otherwise.