30.06.2013 Aufrufe

Softwareentwicklung in C++ - ASC

Softwareentwicklung in C++ - ASC

Softwareentwicklung in C++ - ASC

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

98 5. Funktionen<br />

1 // i n l i n e f u n c d i f f i c u l t . cpp − demo f o r i n l i n e f u n c t i o n s that<br />

2 // are d i f f i c u l t f o r the compiler<br />

3<br />

4 #<strong>in</strong>clude <br />

5 #<strong>in</strong>clude ” u s e r t y p e s . h”<br />

6<br />

7 us<strong>in</strong>g std : : cout ;<br />

8 us<strong>in</strong>g std : : endl ;<br />

9<br />

10 //−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

11 <strong>in</strong>l<strong>in</strong>e u<strong>in</strong>t64 f a c t ( u<strong>in</strong>t64 num)<br />

12 {<br />

13 return (num < = 1 ? 1 : (num ∗ f a c t (num − 1 ) ) ) ;<br />

14 }<br />

15<br />

16 //−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

17 <strong>in</strong>t ma<strong>in</strong> ( <strong>in</strong>t argc , char ∗ argv [ ] )<br />

18 {<br />

19 cout

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!