C++ inline vs. method

I'm just starting to program in C++ and was surprised to find it's a little different to Java and the approach I would have used in Java (returning a whole array) wasn't an option.

Why were you "surprised". Did you think they were the same ?

C/C++ is much older than Java and there is a lot more stuff that the programmer has to pay attention to. Like memory allocation.

It must be very difficult to learn Java and then try and get on top of C. Makes me glad to be old and therefore done the other way around.