Yes - I'm new to this!
I'm trying to make a function return a string to the another section of my program.
The function itself is called headercreate and currently looks like this:
this doesn't work, as I've found out, because I can't return a string. I believe I have to used pointers, but reading the pointer chapter of O'Reilly's Practical C++ Programming has left me none the wiser. Any help would be great!Code:char headercreate(char pagetitle)[1000] { /*Creates a XHTML 1.1 Compatible Header*/ char tmptxt[1000]; strcpy(tmptxt, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"); return tmptxt; }
Thanks, Tom