ah, ok then you shouldn't use auto, using auto there is like declaring a new variable only visible in that block. just use branch=...
like:
if (c == 'F') {
branching = true;
}else if (c == '+') {
auto jointBranch = Branch();
jointBranch.setParent(branch);
jointBranch.roll(45);
branch = Branch();
branch.setParent(jointBranch);
}
you also need to store jointBranch somewhere since it's also going away as soon as the block ends, perhaps put them in a vector or something like that