Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Informatik 2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wadi.T
Informatik 2
Commits
27f1c48d
Commit
27f1c48d
authored
2 years ago
by
T.Wadi
Browse files
Options
Downloads
Patches
Plain Diff
main implimented
parent
c52c626c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.vscode/settings.json
+2
-1
2 additions, 1 deletion
.vscode/settings.json
main.c
+46
-2
46 additions, 2 deletions
main.c
menu.c
+1
-1
1 addition, 1 deletion
menu.c
menu.h
+1
-1
1 addition, 1 deletion
menu.h
test.exe
+0
-0
0 additions, 0 deletions
test.exe
with
50 additions
and
5 deletions
.vscode/settings.json
+
2
−
1
View file @
27f1c48d
...
...
@@ -2,5 +2,6 @@
"files.associations"
:
{
"cds.h"
:
"c"
,
"stdio.h"
:
"c"
}
},
"C_Cpp.errorSquiggles"
:
"Disabled"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
main.c
+
46
−
2
View file @
27f1c48d
#define _CRT_SECURE_NO_WARNINGS
#include
<stdio.h>
#include
<stdlib.h>
#include
"datastructure.h"
#include
"datetime.h"
#include
"tools.h"
#include
"menu.h"
#include
"cds.h"
int
main
()
#define NUMBER_OF_MENU_ITEMS 7
void
main
()
{
unsigned
int
choice
;
char
*
menuTitle
;
char
*
menuItems
[]
=
{
"Neue CD anlegen"
,
"CD bearbeiten"
,
"CD loeschen"
,
"Suchen"
"Sortieren"
,
"Auflisten"
,
"Programm beenden"
};
printLogo
();
delay
(
2
);
clearScreen
();
do
{
choice
=
getMenu
(
menuTitle
,
&
menuItems
[
NUMBER_OF_MENU_ITEMS
],
NUMBER_OF_MENU_ITEMS
);
switch
(
choice
)
{
case
1
:
createCD
();
break
;
case
2
:
editCd
();
break
;
case
3
:
deleteCD
();
break
;
case
4
:
searchSong
();
break
;
case
5
:
sortCDs
();
break
;
case
6
:
ListCDs
();
break
;
case
7
:
exit
(
1
);
break
;
default:
choice
=
0
;
break
;
}
}
while
(
choice
!=
7
);
return
0
;
}
This diff is collapsed.
Click to expand it.
menu.c
+
1
−
1
View file @
27f1c48d
...
...
@@ -8,7 +8,7 @@ int getMenu(char *menuTitle, char *menuItems[], short numberOfMenuItems){
do
{
clearScreen
();
puts
(
*
menuTitle
);
puts
(
menuTitle
);
for
(
u_int8_t
i
=
0
;
i
<
numberOfMenuItems
;
++
i
)
{
printf
(
"%d. %s/n"
,(
1
+
i
),
*
menuItems
[
i
]);
...
...
This diff is collapsed.
Click to expand it.
menu.h
+
1
−
1
View file @
27f1c48d
#pragma once
int
getMenu
(
char
*
,
char
*
[]
,
short
);
int
getMenu
(
char
*
,
char
*
*
,
short
);
This diff is collapsed.
Click to expand it.
test.exe
+
0
−
0
View file @
27f1c48d
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment