c++ - Expected unqualified-id before 'public' -
public class main { static node root; static node current; static boolean directionright = false; static boolean directionleft = false; }
it gives error on line 1. cant figure out what's issue. kindly help. thanks.
your declaration of public class main
should class main
. remove public
modifier. also, boolean
should bool
rightly pointed @holyblackcat. right construction of class should like
class main { static node root; static node current; static bool directionright = false; static bool directionleft = false; }
c++ compiler-errors
No comments:
Post a Comment