operator overloaded but not inherited

This is a discussion on operator overloaded but not inherited within the C++ Programming forums, part of the General Programming Boards category; Which is the only operator in C++ which can be overloaded but NOT inherited...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    113

    operator overloaded but not inherited

    Which is the only operator in C++ which can be overloaded but NOT inherited

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    The assignment operator. What's the next question?
    Sent from my iPadŽ

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    113
    thanx

  4. #4
    Registered User Osaou's Avatar
    Join Date
    Nov 2004
    Location
    Stockholm, Sweden
    Posts
    69
    School assignments + lazy pupil = bad valibhav

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    113
    This is not a school assignment but questions from recruitment papers

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Heh, Sly... fell for it.
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. inherited classes and stl container
    By rahulsk1947 in forum C++ Programming
    Replies: 9
    Last Post: 05-05-2007, 03:27 PM
  2. Limiting inherited interface
    By tuxster in forum C++ Programming
    Replies: 5
    Last Post: 02-23-2006, 10:21 PM
  3. Help With Inherited Classes Needed
    By elliott in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2005, 09:05 AM
  4. Inherited static members
    By Vikstar in forum C++ Programming
    Replies: 2
    Last Post: 08-29-2003, 12:44 AM
  5. inherited for C++
    By Jaguar in forum C++ Programming
    Replies: 3
    Last Post: 07-20-2002, 12:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21