+ 1
why cant i use void instead of int
14 Respuestas
+ 2
void doesn't require you to return a value, int does.
When running a program, the value 1 means running to the operating system, 0 is to terminate and -1 is for an error. They are little queues to the OS on what to do with the programs.
For example, computer plugged in to outlet would be a 1, it has power it can run. Computer unplugged would be a 0, no power it can't run. A power outage and PC on, would result on a -1, the PC did not power down appropriately, caused errors.
Hope this answers your question.
0
you can use both of them
but when you use int....you should but return (0)
in the end
0
What do you mean exactly with that in context of cout?
0
Probably bc it's an app, not a computer program. it probably just has enough content to show the current material.
0
it depends on your compiler
you can use void or int both
according to the software you are working on
0
In void main you can use only comments. In into main you are able to use numbers for various programming. Read about data types you will understand the difference.
0
void means null and int means integer type. u can use both but it depends upon the type of compiler or software u r using like code:: blocks u can use void and int but sometimes it is doesn't run the program.
0
If u reTurn something integer value then must use int keyword
0
yes u can write void main() but u need not to write return 0
0
Its nul
0
because void don't return any value where as in does
0
int is used when your function is receiving integer value from another function.
0
if you write any simple program which has no any return value you should write void main() but for batter practice in c++ it is must
- 1
then why this app doesnt support this function