File Input/Void Function Problem

Posted 25 October 2006 - 08:12 PM

Heres the code i have so far, seems like i just keep doing circles when trying to make this work, but before i post the code the thing im trying to do is be able to call a file from the main function into my void function so i can run getline, find, and string functions on it. I have tried several ways but it doesnt seem to be working at all and i get different errors everytime.

Replies To: File Input/Void Function Problem

Re: File Input/Void Function Problem

Posted 26 October 2006 - 01:11 AM

lostmountainman, on 25 Oct, 2006 - 08:12 PM, said:

Heres the code i have so far, seems like i just keep doing circles when trying to make this work, but before i post the code the thing im trying to do is be able to call a file from the main function into my void function so i can run getline, find, and string functions on it. I have tried several ways but it doesnt seem to be working at all and i get different errors everytime.

and here is what my output is supposed to resemble...if im asking for to much help just let me know then possibly give me some guidelines on how to fix my problem.

The problem you are having is this:
You have misunderstood variable scoping...

Variables declared:
* outside main() are global (and dangerous).
* within the { and } braces of a code block (including nested braces) are local to that region.