Search Results

Search found 14 results on 1 pages for 'user265260'.

Page 1/1 | 1 

  • Overloading new, delete in C++

    - by user265260
    i came across this line is stroustrup An operator function must either be a member or take at least one argument of a user-defined type (functions redefining the new and delete operators need not). Dont operator new and operator delete take an user defined type as one of their arguments? what does it mean, am i missing something here

    Read the article

  • Table View in iPhone

    - by user265260
    I have this code [tableView deselectRowAtIndexPath:indexPath animated:YES]; Why doesn't the table view deselect the row, What am i doing wrong. EDIT: -(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableView deselectRowAtIndexPath:indexPath animated:YES]; }

    Read the article

  • Operator overloading in C++

    - by user265260
    If you overload - like operator-(), it is to be used to the left of the object, however overloading () like operator()() it is used to the right of the object. How do we know which operator is to be used on the left and which ones to be used on the right?

    Read the article

  • Destructors in C++

    - by user265260
    does the Destructor deallocate memory assigned to the object which it belongs to or is it just called so that it can perform some last minute housekeeping before the object os deallocated by the compiler?

    Read the article

  • Copy Constructor in C++

    - by user265260
    i have this code #include <iostream> using namespace std; class Test{ public: int a; Test(int i=0):a(i){} ~Test(){ cout << a << endl; } Test(const Test &){ cout << "copy" << endl; } void operator=(const Test &){ cout << "=" << endl; } Test operator+(Test& p){ Test res(a+p.a); return res; } }; int main (int argc, char const *argv[]){ Test t1(10), t2(20); Test t3=t1+t2; return 0; } Output: 30 20 10 Why isnt the copy constructor called here?

    Read the article

1