[ create a new paste ] login | about

Link: http://codepad.org/iIu1d32Q    [ raw code | output | fork ]

C++, pasted on May 22:
#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;
}


Output:
1
2
3
4
5
6
count before comparison: 0
count after comparison: 1
count before comparison: 0
count after comparison: 1
count before comparison: 0
count after comparison: 0


Create a new paste based on this one


Comments: