[ create a new paste ] login | about

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

wiso - C++, pasted on Mar 18:
#include <iostream>

using namespace std;

void exec(char* option)
{
    cout << "option is " << option << endl;
    if (option == "foo")
        cout << "option foo";
    else if (option == "bar")
        cout << "opzion bar";
    else
        cout << "???";
    cout << endl;
}

int main()
{
    char opt[] = "foo";
    exec(opt);
    return 0;
}


Output:
1
2
option is foo
???


Create a new paste based on this one


Comments: