|
-
Dec 19th, 2007, 05:27 AM
#1
Thread Starter
PowerPoster
Return more than one parameter from a single function
Hi all,
I have a function that calculated two int values. I call the function only by using a string and calculated those two int values. I want to return that two int values from the function when I call it with a string.
Look at the following function,
Code:
bool CharWordCount(string rtf, int& word_count, int& char_count)
{
// Body of the function
// do the processing and find the number of chars and
// number of words of the string
}
One of my friend say i can do it as above. using the bool type return value. Can you guys give me a help how to do that.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
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
|