c - static declaration follows non-static declaration error message -


The compiler is giving me an error message on line 20

 : "Stable announcement" Time "definition of non-static declaration"   

and then another

  line 12: "previous announcement" "time difference" was here " / Code>  

I know that my function is to do something with 'time difference' here my code is:

  #include  ; Composition time {int hours; int minute; int seconds;}; main () {int time difference (stroke) RFFF;); Composition time: initial, late, difference; printf ("hh: mm: ss" at start time); scan f ("% d:% d:% d", and initial, start, and initial minutes, And initial. Seconds); printf ("hh: mm: ss"); scanf ("% d:% d:% d", and late horror, late minutes, and late seconds.); Int Time Depression (Structure Time FIF) {If (late seconds; Lt. Beginner.second) late seconds seconds = 60; late.minutes - = 1; if (late.meats & lt; early.minutes) late. Minutes + = 60; Late hor - = 1; If (late are late); late.hours late.hours + = 24; Diff.seconds = late.seconds - early.seconds; Diff.minutes = late.minutes - beginners Minute; Diff.hours = Late - Beginners Horses; } Return 0; }  "post-text" itemprop = "text"> 

You can not have a function inside C in another. Time Defence on line 12, and the function itself (definition) starts with line 20, you need to move outside of the main () function.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -