Difference: CodeClass2 (4 vs. 5)

Revision 52017-10-19 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Classes

The Candidate Class

Added:
>
>

Candidate.h

  %CODE{"c++"}% #include
Line: 25 to 26
  int getPolls(); void print(); };
Changed:
<
<
//#include "candidate.h"
>
>
%ENDCODE%

Candidate.h

%CODE{"c++"}%
 #include
Added:
>
>
#include "candidate.h"
 using namespace std;

Candidate :: Candidate() {

Line: 59 to 64
  cout << "Party : " << party << endl; cout << "Polls : " << polls << "%" << endl; }
Added:
>
>
%ENDCODE%

main.cpp

%CODE{"c++"}% using namespace std;
  int main() { Candidate h("Hillary Clinton","Democrat",46);
Line: 549 to 559
  %CODE{"c++"}%
Changed:
<
<
%ENDCODE%
>
>
%ENDCODE%
 \ No newline at end of file
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback