No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; int main () { int Count= 0, oldCount, lineNo= 0, pos; string searchStr, testStr, testSearch, fileName, intStr; cout << "File name? "; getline(cin,fileName); ifstream fin(fileName.c_str());; if (!fin) { perror(fileName.c_str()); exit(1); } cout<<"Search string? "; getline (cin, searchStr); testSearch = … |
|
I'm new at programming and I can't figure this out. Can anyone please help? #include <iostream> #include <fstream> #include <string> using namespace std; bool nocase_compare (char c1, char c2) { return toupper(c1) == toupper(c2); } int main( int argc, char* argv[] ) { ifstream infile; string filename; do { cout … |
|
Need to sort an array of objects of type PhoneEntry, using PhoneEntry's greaterAlpha to do your comparisons. I have the sort function, but I'm not sure how to get everything working together. [CODE] #include <iostream> #include <string> using namespace std; class PhoneNumber { private: int area; int prefix; int suffix; … |