Click here to Skip to main content
15,887,411 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to read/write long long ... integer from database? Pin
KarstenK17-Sep-09 21:47
mveKarstenK17-Sep-09 21:47 
AnswerRe: how to read/write long long ... integer from database? [modified] Pin
Saurabh.Garg17-Sep-09 23:31
Saurabh.Garg17-Sep-09 23:31 
Questionpure virtual functions [modified] Pin
hrishiS17-Sep-09 20:36
hrishiS17-Sep-09 20:36 
AnswerRe: pure virtual functions Pin
CPallini17-Sep-09 20:40
mveCPallini17-Sep-09 20:40 
GeneralRe: pure virtual functions Pin
hrishiS17-Sep-09 20:46
hrishiS17-Sep-09 20:46 
GeneralRe: pure virtual functions Pin
Stuart Dootson17-Sep-09 20:58
professionalStuart Dootson17-Sep-09 20:58 
GeneralRe: pure virtual functions Pin
hrishiS17-Sep-09 21:23
hrishiS17-Sep-09 21:23 
GeneralRe: pure virtual functions Pin
Stuart Dootson17-Sep-09 21:50
professionalStuart Dootson17-Sep-09 21:50 
hrishiS wrote:
- we need interface, in order to make an generic structure of so many class. Later when some one adds one more class, it forces the implementer of the class to follow some generic rules (must have those virtual methods)....


Not quite. The interface is used to enforce a contract between code that uses the interface and classes that derive from (and thus have to implement the interface). Using the example I gave before, we could define a Find function like this:

template<class T>
bool Find(IIterable<T> const& i, T const& lookFor)
{
   i.First();
   do
   {
      if (i.Current() == lookFor) return true;
   } while (i.Next());
   return false;
}


The IIterable interface enforces the 'Iterable' contract between Find and any class that implements Iterable.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: pure virtual functions Pin
hrishiS17-Sep-09 21:33
hrishiS17-Sep-09 21:33 
GeneralRe: pure virtual functions Pin
Stuart Dootson17-Sep-09 21:45
professionalStuart Dootson17-Sep-09 21:45 
GeneralRe: pure virtual functions Pin
hrishiS17-Sep-09 22:25
hrishiS17-Sep-09 22:25 
GeneralRe: pure virtual functions Pin
Cedric Moonen17-Sep-09 21:00
Cedric Moonen17-Sep-09 21:00 
AnswerRe: pure virtual functions Pin
Kushagra Tiwari17-Sep-09 20:44
Kushagra Tiwari17-Sep-09 20:44 
GeneralRe: pure virtual functions Pin
Cedric Moonen17-Sep-09 20:53
Cedric Moonen17-Sep-09 20:53 
GeneralRe: pure virtual functions Pin
hrishiS17-Sep-09 20:55
hrishiS17-Sep-09 20:55 
AnswerRe: pure virtual functions Pin
«_Superman_»17-Sep-09 20:44
professional«_Superman_»17-Sep-09 20:44 
AnswerRe: pure virtual functions Pin
Cedric Moonen17-Sep-09 20:51
Cedric Moonen17-Sep-09 20:51 
GeneralRe: pure virtual functions Pin
hrishiS17-Sep-09 21:00
hrishiS17-Sep-09 21:00 
GeneralRe: pure virtual functions Pin
Cedric Moonen17-Sep-09 21:12
Cedric Moonen17-Sep-09 21:12 
GeneralRe: pure virtual functions Pin
CPallini17-Sep-09 22:09
mveCPallini17-Sep-09 22:09 
AnswerRe: pure virtual functions Pin
RugbyLeague17-Sep-09 22:09
RugbyLeague17-Sep-09 22:09 
GeneralRe: pure virtual functions Pin
hrishiS17-Sep-09 22:28
hrishiS17-Sep-09 22:28 
GeneralRe: pure virtual functions Pin
RugbyLeague17-Sep-09 22:43
RugbyLeague17-Sep-09 22:43 
AnswerRe: pure virtual functions - an example for you. Pin
Iain Clarke, Warrior Programmer17-Sep-09 23:00
Iain Clarke, Warrior Programmer17-Sep-09 23:00 
QuestionDifferentiating SHUTDOWN and RESTART ? Pin
Kushagra Tiwari17-Sep-09 20:29
Kushagra Tiwari17-Sep-09 20:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.