Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

C # how to realize the program of employee management system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to implement the employee management system program of c #, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let's take a look at it.

# include "stdio.h"

# include "stdlib.h"

# include "string.h"

# include "conio.h"

# define PAGE 3

# define MAX 1000

# define N 5

Int kryp0

/ * structure type * /

Typedef struct

{int num;/* employee number * /

Char name [20]; / * name * /

Char sex [5]; / * gender * /

Int age;/* Age * /

Char studentclass [20]; / * Department * /

Int score;/* salary * /

} STUDENTS

Int read_file (STUDENTS stu [])

{FILE * fp

Int iTunes 0

If ((fp=fopen ("stu.txt", "rt")) = = NULL)

{printf ("\ n\ n* inventory file does not exist! please create")

Return 0

}

While (feof (fp)! = 1)

{

Fread (& stub [I], sizeof (STUDENTS), 1meme FP)

If (StuI] .num = = 0)

Break

Else

ITunes +

}

Fclose (fp)

Return i

}

Void save_file (STUDENTS stu [], int sum)

{FILE*fp

Int i

If ((fp=fopen ("stu.txt", "wb")) = = NULL)

{printf ("file write error!\ n")

Return

}

For (iSuppli)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report