Why can't I just return the string in my query function?
I'm not sure why I can just return the string in this query function

9 Replies
the function is expecting a reference of the string to be returned I think
string&
do i make declare title to be string& in my class declaration?
or do i do it in my function?
I think you want it to return a copy of the string
just
string
change it in both your function prototype and declarationthe function prototype and declaration was given to me, i can't change that
so i guess do i make a temp variable and return that?
i can only change the member variables
or add more variables
wait a sec its been too long idk c++ lmao
this should work

im getting this error
your prototype and func implementation doesnt match up
oh wait
change the name of your function
to not be the name of your class member
getTitle()
oh i see lol
thank you
it works now