Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Algorithms and flowcharts (Yet another C++ assignment).
#18
MariaColette Wrote:Oh, I thought I had that in the main, but that's lineNum and wordNum... so I just had to change the names. Tongue

It's ok for the main and function to call the variable by different names, e.g.

Code:
int square(int n)
{
    return n*n;
}

void main()
{
    int num;
...
    cout << "the square of " << num << " is " << square(num) << end;
...
}

Or in your case
GetWord(inF, lineNum, wordNum, word);
Reply


Messages In This Thread
Algorithms and flowcharts (Yet another C++ assignment). - by SaptaZapta - 2013-09-25, 07:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)