codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <iostream> #include <string> using std::cout; using std::endl; void readByString(std::string f1, std::string f2, std::string f3){ int count = 0; cout << "count before comparison: " << count << endl; if(f1 == f2) count++; if(count > 1) cout << f1 << " " << f2 << endl << f3 << endl; else cout << "count after comparison: " << count << endl; } int main() { readByString("zeethe", "zeethe", "the"); readByString("price", "price", "price"); readByString("is", "right", "a"); return 0; }
Private
[
?
]
Run code
Submit