Answer the question
In order to leave comments, you need to log in
Links in Kotlin?
There is C++ code :
class ExampleClass {
public:
int value;
ExampleClass() { value = 0; }
}
void function(ExampleClass &obj) {
obj.value = 1;
}
int main() {
ExampleClass obj;
function(obj);
cout << obj.value << endl;
return 0;
}
ExampleClass function(ExampleClass obj) {
obj.value = 1;
return obj;
}
Answer the question
In order to leave comments, you need to log in
At least he would say what exactly does not fit. Because this is exactly what will be a complete analogue (in Kotlin everything is a reference, you can’t put anything on the stack.
Uh-uh
Your code is from Java, what does Kotlin have to do with it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question