Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~342 People Reached
Favorite Forums
Favorite Tags
c++ x 11
Member Avatar for old_jefrey

Hi there, Let's say we have the following: [code] #include <map> #include <string> #include <vector> #include <algorithm> using namespace std; typedef pair<string, int> Data; class DataCompare { public: bool operator()(const Data& el1, const Data& el2) const { return lessK(el1.first, el2.first); } bool operator() (const Data& el1, const Data::first_type& k) const …

Member Avatar for old_jefrey
0
104
Member Avatar for old_jefrey

I started to do some reading about template, found interesting example [code] template <class T1, class T2> bool GetItUP (T1 a, T2 b) { return (a>b?a:b); } [/code] And the way to use it: [code] int _tmain(int argc, _TCHAR* argv[]) { int a = 20; float b = 23.90; GetItUP<int,float>(a,b); …

Member Avatar for mrnutty
0
101
Member Avatar for old_jefrey

Let’s say you have few functions: func_1(arg1, arg2, arg3) , func_2 (arg1, arg2) and func_3 (arg1, arg2, arg3). All 3 performing similar steps: func (arg1, arg2, arg3) { Read line from the file validate_func() Store results into arg3 } So my question is – what would best way to approach …

Member Avatar for mike_2000_17
0
137