how use strings and pointers?

i have these function:
1
2
3
4
5
6
string *strreaded=NULL;
void read(string &txttext)
    {
        blnread=true;
        strreaded=&txttext;//string
    }

if i avoid the '&', on assigment, i will get an error.
so how can i adress the txttext parameter to strread?
Last edited on
Your function makes no sense. What are you trying to do exactly?
read some data and put it on pointed variable.
but now it's fixed:
1
2
3
4
5
void read(string &txttext)
    {
        blnread=true;
        strreaded=&txttext;//string
    }

my problem was how i changed the variable value:
*richedit->strreaded=*richedit->strreaded + char(wParam);
yah... i forget the '*'.
now works for what i need thanks for all
Topic archived. No new replies allowed.