No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi I need some help. I am trying to write a program that will search a file for numbers of type int and write the largest and the smallest numbers to the screen. This is how far I got but when I it came to writing the code that would … |
|
Hey guys need as much help as you can give me cause I need to turn this in by midnight. I am trying to do this: You are to write a program that will input English text translate it into Pig Latin, then output the result to a file Pig … |
|
I am new to C++ so I am trying to understand why the program behaves differently if you do this [CODE] #include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main() { ifstream fin; ofstream fout; fin.open("getfromthisfile.txt"); if(fin.fail()) { cout << "Input file opening failed.\n"; exit(1); } fout.open("sendtothisfile.txt"); if(fin.fail()) … |
|
Hi, I am having a problem with using file input/output streams in this program. [CODE] #include <fstream> using std::ifstream; using std::ofstream; using std::endl; int main() { ifstream inStream; ofstream outStream; inStream.open("infile.txt"); outStream.open("outfile.txt"); int first, second, third; inStream >> first >> second >> third; outStream << "The sum of the first3\n" … |