[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Extern funktion



Hej,

Jeg sidder lige og undrer mig over nedenstående. 

Fra hoved-filen defineres en ekstern funktion.
--SNIP--
/* Definition af en ektern rutine fra filen check.c */
extern func_check(int tjek); 

main()
{
  int tjek;

  tjek = 5;
  func_check(tjek);

  printf("tjek = %d\n",tjek);

  return(0);
} 
--SNIP--
Den ekterne funtion er som følger:
--SNIP--
/* Kaldes fra main.c */
func_check(int tjek)
{
  
  ++tjek;
}
--SNIP--
Når dette kompileres med gcc fås output af tjek til tjek=5, men 
hvorfor det?

vh Peter Gylling


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *