#include "stdafx.h" #include "stdio.h" #include "conio.h" #include "string.h" #include "fstream.h" #include "iostream.h" main() { int a1,a2,c,ch='a'; do { //* Willkommen :P printf ("\n\n !!!W E L C O M E!!! \n\n\n\n\n\n"); //* Menue printf ("\n [1] Lagerbestand \n"); printf (" [2] Bestelliste \n"); printf (" [3] Statistik \n"); printf (" [4] Dokumentation \n\n\n\n\n"); printf (" [5] Exit \n\n\n\n\n\n"); printf (" Mit ENTER bestaetigen... "); //* Abfrage scanf ("%i",&a1); if (a1==1) { char datei[]="testfile.txt"; ofstream ausgabe; ausgabe.open(datei,ios::app); fputc (ch, ausgabe); if(ausgabe.good()); printf ("\n alles ok "); ausgabe.close(); getch(); }; if (a1==2) { printf ("\n Lagerbestand \n\n"); }; if (a1==3) { printf ("\n Lagerbestand \n\n"); }; if (a1==4) { printf ("\n ende \n\n"); }; if (a1==5) { printf ("\n Dokumentation \n\n"); break ; }; } while (a1 < 5) ; }