Main.cc:9:19: error: ISO C++ forbids initialization of member ‘character’ [-fpermissive] Main.cc:9:19: error: making ‘character’ static [-fpermissive] Main.cc:9:19: error: ISO C++ forbids in-class initialization of non-const static member ‘character’ Main.cc:9:19: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null] Main.cc:10:15: error: ISO C++ forbids initialization of member ‘next’ [-fpermissive] Main.cc:10:15: error: making ‘next’ static [-fpermissive] Main.cc:10:15: error: invalid in-class initialization of static data member of non-integral type ‘List*’ Main.cc:11:14: error: ISO C++ forbids initialization of member ‘pre’ [-fpermissive] Main.cc:11:14: error: making ‘pre’ static [-fpermissive] Main.cc:11:14: error: invalid in-class initialization of static data member of non-integral type ‘List*’ Main.cc: In function ‘void printList()’: Main.cc:22:26: warning: NULL used in arithmetic [-Wpointer-arith] Main.cc:23:18: error: ‘class List’ has no member named ‘next’ Main.cc:29:19: error: ‘class List’ has no member named ‘next’ Main.cc:34:21: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null] Main.cc: In function ‘void moveLeft()’: Main.cc:40:30: error: ‘class List’ has no member named ‘pre’ Main.cc:43:17: error: ‘class List’ has no member named ‘pre’ Main.cc: In function ‘void moveRight()’: Main.cc:48:30: error: ‘class List’ has no member named ‘next’ Main.cc:51:17: error: ‘class List’ has no member named ‘next’ Main.cc: In function ‘void Push(char*)’: Main.cc:61:10: error: ‘class List’ has no member named ‘next’ Main.cc:62:10: error: ‘class List’ has no member named ‘pre’ Main.cc:65:6: error: ‘class List’ has no member named ‘next’ Main.cc:65:20: error: ‘class List’ has no member named ‘next’ Main.cc:66:6: error: ‘class List’ has no member named ‘next’ Main.cc:67:6: error: ‘class List’ has no member named ‘pre’ Main.cc:68:10: error: ‘class List’ has no member named ‘next’ Main.cc:69:18: error: ‘class List’ has no member named ‘next’ Main.cc:72:14: error: ‘class List’ has no member named ‘next’ Main.cc:73:7: error: ‘class List’ has no member named ‘next’ Main.cc:76:7: error: ‘class List’ has no member named ‘next’ Main.cc:76:21: error: ‘class List’ has no member named ‘next’ Main.cc:77:7: error: ‘class List’ has no member named ‘next’ Main.cc:79:7: error: ‘class List’ has no member named ‘pre’ Main.cc:80:11: error: ‘class List’ has no member named ‘next’ Main.cc:81:19: error: ‘class List’ has no member named ‘next’ Main.cc: In function ‘void Pop()’: Main.cc:92:17: error: ‘class List’ has no member named ‘pre’ Main.cc:99:14: error: ‘class List’ has no member named ‘next’ Main.cc:100:11: error: ‘class List’ has no member named ‘next’ Main.cc:100:21: error: ‘class List’ has no member named ‘next’ Main.cc:101:11: error: ‘class List’ has no member named ‘next’ Main.cc:104:11: error: ‘class List’ has no member named ‘next’ Main.cc:109:10: error: ‘class List’ has no member named ‘next’ Main.cc:110:11: error: ‘class List’ has no member named ‘next’ Main.cc:113:11: error: ‘class List’ has no member named ‘next’ Main.cc:113:21: error: ‘class List’ has no member named ‘next’ Main.cc:114:7: error: ‘class List’ has no member named ‘next’
busyhuman 8년 전
제출을 했더니 컴파일에러가 수두룩 뜹니다..
무엇이 잘못된건가요 ?
######################
Main.cc:9:19: error: ISO C++ forbids initialization of member ‘character’ [-fpermissive]
Main.cc:9:19: error: making ‘character’ static [-fpermissive]
Main.cc:9:19: error: ISO C++ forbids in-class initialization of non-const static member ‘character’
Main.cc:9:19: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
Main.cc:10:15: error: ISO C++ forbids initialization of member ‘next’ [-fpermissive]
Main.cc:10:15: error: making ‘next’ static [-fpermissive]
Main.cc:10:15: error: invalid in-class initialization of static data member of non-integral type ‘List*’
Main.cc:11:14: error: ISO C++ forbids initialization of member ‘pre’ [-fpermissive]
Main.cc:11:14: error: making ‘pre’ static [-fpermissive]
Main.cc:11:14: error: invalid in-class initialization of static data member of non-integral type ‘List*’
Main.cc: In function ‘void printList()’:
Main.cc:22:26: warning: NULL used in arithmetic [-Wpointer-arith]
Main.cc:23:18: error: ‘class List’ has no member named ‘next’
Main.cc:29:19: error: ‘class List’ has no member named ‘next’
Main.cc:34:21: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null]
Main.cc: In function ‘void moveLeft()’:
Main.cc:40:30: error: ‘class List’ has no member named ‘pre’
Main.cc:43:17: error: ‘class List’ has no member named ‘pre’
Main.cc: In function ‘void moveRight()’:
Main.cc:48:30: error: ‘class List’ has no member named ‘next’
Main.cc:51:17: error: ‘class List’ has no member named ‘next’
Main.cc: In function ‘void Push(char*)’:
Main.cc:61:10: error: ‘class List’ has no member named ‘next’
Main.cc:62:10: error: ‘class List’ has no member named ‘pre’
Main.cc:65:6: error: ‘class List’ has no member named ‘next’
Main.cc:65:20: error: ‘class List’ has no member named ‘next’
Main.cc:66:6: error: ‘class List’ has no member named ‘next’
Main.cc:67:6: error: ‘class List’ has no member named ‘pre’
Main.cc:68:10: error: ‘class List’ has no member named ‘next’
Main.cc:69:18: error: ‘class List’ has no member named ‘next’
Main.cc:72:14: error: ‘class List’ has no member named ‘next’
Main.cc:73:7: error: ‘class List’ has no member named ‘next’
Main.cc:76:7: error: ‘class List’ has no member named ‘next’
Main.cc:76:21: error: ‘class List’ has no member named ‘next’
Main.cc:77:7: error: ‘class List’ has no member named ‘next’
Main.cc:79:7: error: ‘class List’ has no member named ‘pre’
Main.cc:80:11: error: ‘class List’ has no member named ‘next’
Main.cc:81:19: error: ‘class List’ has no member named ‘next’
Main.cc: In function ‘void Pop()’:
Main.cc:92:17: error: ‘class List’ has no member named ‘pre’
Main.cc:99:14: error: ‘class List’ has no member named ‘next’
Main.cc:100:11: error: ‘class List’ has no member named ‘next’
Main.cc:100:21: error: ‘class List’ has no member named ‘next’
Main.cc:101:11: error: ‘class List’ has no member named ‘next’
Main.cc:104:11: error: ‘class List’ has no member named ‘next’
Main.cc:109:10: error: ‘class List’ has no member named ‘next’
Main.cc:110:11: error: ‘class List’ has no member named ‘next’
Main.cc:113:11: error: ‘class List’ has no member named ‘next’
Main.cc:113:21: error: ‘class List’ has no member named ‘next’
Main.cc:114:7: error: ‘class List’ has no member named ‘next’
#############################