I’m trying to get a reference to const QString &a outside of my function i.e.
void function(const QString &a)
{
//code
}
void otherFunction()
{
// code <<<<<
// I'm unsure how I would be able to get a reference to
// const QString &a here and use it.
}
How could I get a reference to a in otherFunction?
For example you can define QString a as a class member 🙂
So you can access this variable from any method of your class: