Note that = is not an equality operator like you're used to from math. In C++ = is the assignment operator. It assigns the value on the right to the variable on the left.
name = test; // Assigns the value of test to the variable name.
Oh thank you so much. So I was passing the value into test and which left the name variable with no value in it then it got assigned to test thus returning nothing.