c++ converter

Discussion in 'C' started by unmounted, May 31, 2008.

  1. unmounted

    unmounted New Member

    Joined:
    May 31, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I want to change the Java code into C++. I have tried it but its not that easy for me as a Java newbie.
    Pls. help me out. Thanks!
    I am sorry for posting in the wrong Forum.
    Code:
    public class Ringing { 
     
      private Nextdoor door; 
     
      public Ringing(Nextdoor door) { 
        this.door = door; 
      } 
     
      public void findout(Bite bite) { 
        System.out.println("   Ringing: ‘" + 
          bite.getMusic() + "’ hearing"); 
        List leftBite = door.getLeftBite(); 
        for (Iterator i = leftBite.iterator(); i.hasNext(); ) { 
          Bite allowedBite = (Bite)i.next(); 
          if (allowedBite.equals(bite)) { 
            door.opened(); 
            return; 
          } 
        } 
        System.out.println("You are not allowed inside."); 
      } 
    }
     
    Last edited by a moderator: Jun 1, 2008

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice