0

Void main is not working in code block compiler.. Why?

18th Feb 2017, 4:15 PM
Skelli Bro
Skelli Bro - avatar
2 RĂ©ponses
+ 2
If I'm not wrong, you have to use the type "int" for main() function. Maybe what you want to do is tell the function main() to be void -> main(void). That, you can do in Code::Blocks. At the end of the main() function, you return a value of 0 or 1, which are integers... that's why you define the function with int type.
18th Feb 2017, 4:32 PM
Alberto
Alberto - avatar
+ 1
but what if we are dealing with function?
29th Mar 2018, 1:34 PM
Muhammad Sohail
Muhammad Sohail - avatar