how use strings and pointers?
Oct 31, 2015 at 9:29pm UTC
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 Oct 31, 2015 at 9:30pm UTC
Oct 31, 2015 at 10:17pm UTC
Your function makes no sense. What are you trying to do exactly?
Nov 1, 2015 at 11:59am UTC
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.