diff options
author | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-13 17:17:31 +0100 |
---|---|---|
committer | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-13 17:17:31 +0100 |
commit | 78109333d989fa678c3c864defc4ef9d170f58ce (patch) | |
tree | c31e0f73a272ea023a67e78f904642531e57bc50 /main.c | |
parent | d4c120217549f928a01ef5a69b3760851e1fda8d (diff) |
Initial commit
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 34 |
1 files changed, 8 insertions, 26 deletions
@@ -1,27 +1,9 @@ -#include "blatt09_1_2.h" - -Student studenten[3]; - -int main() -{ - studenten[0] = (Student) { "Anna" , "Musterfrau" , 22222 , "Am Schwarzenberg-Campus 3" , 4}; - studenten[1] = (Student) { "Hans", "Peter", 44444, "Kasernenstrasse 12", 2}; - studenten[2] = (Student) { "Lisa", "Lustig", 66666, "Denickestrasse 15", 8}; - print_studenten(); - printf("tausche 1 mit 3\n"); - swap(studenten, studenten + 2); - print_studenten(); -} - -void print_studenten() -{ - for (u8 i = 0, sz = sizeof(studenten)/sizeof(Student); i < sz; i++) - printf("{\"%s\", \"%s\", %u, \"%s\", %u}\n", studenten[i].vorname, studenten[i].nachname, studenten[i].matrikelnummer, studenten[i].adresse, studenten[i].kurse); -} - -void swap(Student *s1, Student *s2) -{ - struct student buffer = *s1; - *s1 = *s2; - *s2 = buffer; +#include "main.h"
+
+int main(int argc, char **argv)
+{
+ gtk_init(&argc, &argv);
+ GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
+ gtk_widget_show(window);
}
\ No newline at end of file |