0

Why won't the 'luck' function get executed?
Pasting the code of my tutorial in my compiler creates the exact same error as the little test code below:
'luck' undeclared. First use this function.
I use dev c++

Thx ;)

int main()
{
   printf("hellow (printed in main)\n");
   luck();
 
   return 0;
}
 
luck()
{
  printf("hellow again (printed in luck)\n");
}
2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by flageolet
0

Why won't the 'luck' function get executed?
Pasting the code of my tutorial in my compiler creates the exact same error as the little test code below:
'luck' undeclared. First use this function.
I use dev c++

Thx ;)

int main()
{
   printf("hellow (printed in main)\n");
   luck();
 
   return 0;
}
 
luck()
{
  printf("hellow again (printed in luck)\n");
}

declare as

void luck();

at top.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.