At 2/4/2010 06:44 AM, you wrote: >On Thu, Feb 4, 2010 at 10:43 AM, Sanjeev Gopinath ><[email protected]> wrote: > > printf and scanf have been declared in stdio.h. But why are we allowed to > > use them even without including stdio.h? > >Because the compiler you're using is allowing you to, or it's not >failing catastrophically. > >Some compilers presume the prototype for printf() etc, others treat >any unprototyped calls to functions as int foo(number, of, parameters, >when, first, seen) in the expectation that it'll match what's actually >in the library. > >-- >PJH
I'm using WXDev-CPP and all I need to include is <cstdlib> ... it seems to include the prototypes but I haven't actually looked. ~Rick
