Results 1 to 2 of 2

Thread: Return more than one parameter from a single function

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    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

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Return more than one parameter from a single function

    You've already asked this and we've already answered it.
    http://www.vbforums.com/showthread.php?t=496431
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width