<identifier> expected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grace2010
    New Member
    • Apr 2010
    • 1

    <identifier> expected

    I've been trying to compile my code but it wouldnt the <identifire> expected error keeps on coming showing

    /**
    * Constructor for objects of class years
    */
    public years(int newNumDays, newNumMonth, newNumYears)
    {
    numMonth = newNumDays;
    numDays = newNumMonth;
    numYears = newNumYears;
    }

    the curly brackets are correct and now im just lost on how to fix this
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    public years(int newNumDays, int newNumMonth, int newNumYears)

    You need a type identifier on each argument.

    Comment

    Working...