I am new to C. Can someone explain me whats the difference between these?
I usually use pointers like this:
int myFunction(int* something) {
...
}
int main() {
int something;
something = 0;
myFunction(&something);
...
}
But I've found code which looks like this:
int myFunction(int& something) {
...
}
int main() {
int something;
something = 0;
myFunction(something);
...
}
It seems like the exactly same thing for me. Is there any difference?