whenever i use a function which is called in main function, it gives this error: Call to undefined function in function main()
i am using turbo c++ compiler version 4.5 and windows vista ultimate service pack 2
Can you tell which header file or something else is to be used. I am beginner in C language.
An example which produces this error:
#include<stdio.h>
main( )
{
int i ;
int marks[ ] = { 1, 2, 3, 4, 5, 6, 7 } ;
for ( i = 0 ; i <= 6 ; i++ ) display ( marks[i] ) ;
}
display ( int m )
{
printf ( "%d ", m ) ;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…