How to copy one char* array to another.

I write function but can not copy one array to second. If is one alert work good, but if are two alerts program is stoped witch error.
I want to copy text to value *t on end function.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void returnTEXT(char** t){
	// methot return set *t="\0"
	char tempText[2] = "\0";
	this->returnAlert01(&t);
	if (*t != "\0")
	 strcat(tempText, *t);

         // methot return set *t="\0"
	this->returnAlert02(&t);
	if (*t != "\0")
	 strcat(tempText, *t);


	std::cout << tempText << " " << strlen(tempText) << std::endl;
}
Last edited on
if (*t != "\0")
should be
if (*t != 0)
or
if (*t != NULL)
Topic archived. No new replies allowed.