Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
Ternary operator - warnings about unsued valuesWarning(s): source_file.cpp: In function ‘int main()’: source_file.cpp:7:38: warning: left operand of comma operator has no effect [-Wunused-value] std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl; ^ source_file.cpp:7:40: warning: right operand of comma operator has no effect [-Wunused-value] std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl; ^ source_file.cpp:7:42: warning: right operand of comma operator has no effect [-Wunused-value] std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl; ^ source_file.cpp:7:44: warning: right operand of comma operator has no effect [-Wunused-value] std::cout << ((0) ? (1) : (2,3,4,5,6)) << std::endl; ^ 6 |
λ
.NET NoSQL database for rapid development
|