Hello. Coming from c#, where classes instances are passed by reference(this is, a copy of the reference is passed when you call a function, instead of the integral value), I'd like to know how this works in c++. In the following case, _poly = poly; is copying the value of poly to _poly, or what? Thanks
#include <iostream>
#include <stdio.h>
#include <stdarg.h>
#include <vector>
using namespace std;
class polynomial {
private:
vector<int> _poly;
public:
void Set(vector<int> poly);
};
void polynomial::Set(vector<int> poly) {
_poly = poly; <----------------
}