|
-
February 19th, 2003, 10:28 PM
#1
returning character strings
Is the only way to return a string, as in a character array, to using a pointer array?
And if you cout the function that returns the character array, will it cout the contents or something else?
Just a generic example...
char Name(char a[])
{
return a[];
}
The function call...
cout << Name("Cristina");
This is a very generic example. The program I'm working on manipulates 3 char arrays and puts them in to one. I need to return the array. So my main question is do i need return a pointer array so that when i say cout << Name("Cristina"); Cristina is on the screen?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|