Hello! I am working on a problem to count characters (without using strings) and I got my program to work! However, I got it to work before I put the code that counts characters into a function (countChar), which is required for this assignment. I'm not sure I understand how to open the file in main and then reference that file in a function. I am posting both versions of my code. The first works, the second does not display cout in my function, but does exit. Any explanation on how to link the function to the file I'm opening in main would be very much appreciated. Thanks!