Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
84% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
4 Commented Posts
0 Endorsements
Ranked #1K
~4K People Reached
Favorite Forums
Favorite Tags
c++ x 37
c x 2

22 Posted Topics

Member Avatar for wangatang126

Code terrible. It is difficult to even understand what you are trying to do. Opening bracket itself:) ... there are no closing parenthesis ...

Member Avatar for stephen186
0
103
Member Avatar for Kaotic07

[CODE] #include <string> #include <fstream> #include <iterator> int main() { std::ifstream in1("file1.txt"); std::ifstream in2("file2.txt"); std::ofstream out("file3.txt"); std::istream_iterator<std::string> it1(in1); std::istream_iterator<std::string> it2(in2); std::istream_iterator<std::string> end; while ( it1 != end && it2 != end ) { out << *it1++ << *it2++; } return 0; } [/CODE]

Member Avatar for Kaotic07
0
153
Member Avatar for A Tripolation

I would have solved the problem as follows. Create an array of objects of std:: pair <int, int>. In the loop, when you enter values would determine how to categorize this number. And on the test results would set the flag. ex.: [CODE] typedef std::pair<int, int> item; std::vector<item> array; ... …

Member Avatar for A Tripolation
0
167
Member Avatar for jessicamelillo
Member Avatar for RajNOX
Member Avatar for luskbo

[CODE] #include <string> #include <fstream> #include <iostream> #include <algorithm> int main() { const std::string pattern("$$$"); std::ifstream file("d:\\test.txt"); if ( !file ) { std::cerr << "Can`t open file!" << std::endl; return 1; } std::string line; while ( std::getline(file, line) ) { if ( line.empty() ) continue; if ( std::search(line.begin(), line.end(), pattern.begin(), …

Member Avatar for mrnutty
0
182
Member Avatar for axed
Member Avatar for wavsyntax
Member Avatar for apo

[CODE] #include <fstream> #include <string> int main() { for ( char ch = 'A'; ch <= 'Z'; ch++ ) { std::string fn = ch + std::string(".txt"); std::ofstream file(fn.c_str()); } return 0; } [/CODE]

Member Avatar for niXman
-1
185
Member Avatar for abhaymv

The only one right decidion is to overload the operator<< () and operator>> ()

Member Avatar for abhaymv
0
192
Member Avatar for pac-man

And what is the actual problem? You can do this in two ways. 1. Use regular expressions. 2. Write a simple parser myself.

Member Avatar for pac-man
0
152
Member Avatar for drake2212
Member Avatar for freakgamerz

[CODE] int getPrintDetails() { int gameNum; int point; char print = 0; cout<<"Do you wish to print details <Y/N>?: "; cin >> print; return (print == 'Y'); } [/CODE]

Member Avatar for Clinton Portis
0
188
Member Avatar for Shinedevil
Member Avatar for Instinctlol
Member Avatar for Aild
Member Avatar for tkud

All about STL you may find at: [url]http://www.cplusplus.com/reference/[/url]

Member Avatar for tkud
0
130
Member Avatar for infinisource

[CODE] int main() { std::cout << "Press 1 for Product 1, 2 for Product 2, 3 for Product 3, 4 for Product 4, 5 for Product 5 or Q to Quit:\n"; int productNumber; int productQTY; std::cin >> productNumber >> productQTY; std::cout << "productNumber = " << productNumber << std::endl; std::cout …

Member Avatar for niXman
0
169
Member Avatar for Burnout

[CODE] #include <algorithm> #include <iostream> int main(int argc, const char** argv) { const int N = 15; int storage[N]; // Array to store up to 15 integers. int* end = &storage[N]; // int x; // Variable x, which becomes 0 in the for loop. int number; // This will be …

Member Avatar for restrictment
0
121
Member Avatar for godsgift2dagame

[CODE] #include <vector> #include <iostream> #include <fstream> #include <sstream> #include <iterator> #include <string> #include <cctype> int main() { std::vector<int> arr; std::string str; std::ifstream file("d:\\test.txt"); if ( !file ) { std::cerr << "Can`t open file!" << std::endl; return 1; } while ( std::getline(file, str, ' ') ) { if ( !isdigit(str[0]) …

Member Avatar for godsgift2dagame
0
186
Member Avatar for turbeauxpete

In Windows and Linux I use it: [url]http://get.qt.nokia.com/qtsdk/qt-sdk-win-opensource-2009.04.exe[/url]

Member Avatar for Dave Sinkula
0
94
Member Avatar for edwar
Member Avatar for niXman
0
63

The End.