about summary refs log tree commit diff stats
path: root/dev/c/basic.html
diff options
context:
space:
mode:
authorSilvino <silvino@bk.ru>2019-06-28 03:58:25 +0100
committerSilvino <silvino@bk.ru>2019-06-28 03:58:25 +0100
commitbb4fd340e7a1faffc363c6baa2f67e84b3a34f0c (patch)
treeb8e4bed0ede5b48bf26b920949e83e36c1fe431c /dev/c/basic.html
parent296be79a3b724db67a37244a67cfb3e4ef6b652f (diff)
parentfe94262de38aafc839963ced9b82ee45d81b65f5 (diff)
downloaddoc-bb4fd340e7a1faffc363c6baa2f67e84b3a34f0c.tar.gz
doc release 0.5.4
Diffstat (limited to 'dev/c/basic.html')
-rw-r--r--dev/c/basic.html59
1 files changed, 59 insertions, 0 deletions
diff --git a/dev/c/basic.html b/dev/c/basic.html
new file mode 100644
index 0000000..104e59a
--- /dev/null
+++ b/dev/c/basic.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+	<meta charset='utf-8'>
+	<title>C - Basic</title>
+    </head>
+    <body>
+        <a href="../index.html">C &amp; GDB Index</a>
+
+	<h1>C - Basic</h1>
+
+	<h2 ="sources">Multiple Sources</h2>
+
+	<p>To organize code in multiple files split above
+	example in main.c, hello.c and hello.h. Content of
+	main.c;<p>
+
+	<pre>
+	#include "hello.h"
+
+	int main() {
+	    hello("world");
+	    return 0;
+	}
+	</pre>
+
+	<p>Header file contains declaration of the function hello,
+	content of hello.h;</p>
+
+	<pre>
+	void hello(const char* name);
+	</pre>
+
+	<p>Implementation of hello function in hello.c;</p>
+
+	<pre>
+	#include &lt;stdio.h&gt;
+	#include "hello.h"
+
+	void hello(const char* name) {
+	    printf("Hello, %s!\n", name);
+	}
+	</pre>
+
+	<p>Compile;</p>
+
+	<pre>
+	$ gcc -Wall main.c hello.c -o hello
+	</pre>
+
+	<a href="../index.html">C &amp; GDB Index</a>
+	<p>
+	This is part of the Hive System Documentation.
+	Copyright (C) 2019
+	Hive Team.
+	See the file <a href="../../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+	for copying conditions.</p>
+    </body>
+</html>