I did have fin defined already, so I added the statement to open the file. It still will only display the text I have outputting previous to using the info from the payroll.txt file. It doesn't error...
Type: Posts; User: blueshift1980
I did have fin defined already, so I added the statement to open the file. It still will only display the text I have outputting previous to using the info from the payroll.txt file. It doesn't error...
I'm trying to read in information from a .txt file. I have had a hard time finding the information on how to compile this correctly. The .exe will run but it seems to ignore the .txt file. I am...
In my classes in C++ so far we have been using
using namespace std;
I see other examples of code where certain keywords are prefaced with std: instead of using the above declaration. Why is...
Doh! Somehow forget one of the variables.
I am working with a problem that pulls information from an input file. Here is the .cpp file:
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
Thanks matsp! I get it now. I knew not to trust what was in the book! Thanks for the quick reply, I will so be back to this forum constantly for help.
Isn't the first for loop setting the count of each element to 0? That is what you guys mean correct?
Thanks for the super quick reply!
I'm working on a problem that counts the frequency of letters. I basically have the logic correct (it's from my textbook so I'm going to assume it should run ok. However, when it goes to print out...