Message from C, C++ talks

June 2019

— That's u're writing with phone ? :D

— Yea ! now it's working !

— Nop , it's look good ?

— The reason that’s not working is because you’re not allowed to put a function below the main function

Message permanent page

— 

Something very strange is that how i do not need to set functuin before main ?
how the hell it's working for me ?

— Not u, Dima)

— I have done that before and is drove me mad till I Realise how stupid I was

— I mean , in python u have to set function before you use it

— Here i set the function in the last lines

— Yes but this is C++ not python

— Python is childsplay

— U must declarated ur func before use it

— Sure but acually this question is not about python , it's about logics

— That's not true. If you had given the function protype in main, then you can put a function below main().

Message permanent page

— A compiler doesn't know about a function until it has seen it, so it must either be declared upfront or only be used after the function passed the compilation process

Message permanent page