int ReadStuInfoFromFile(char *name, student **stu)
{
FILE *f;
student* stuTbl;
int count = 0;
*stu = NULL;
if (name && stu != NULL){
f = fopen(name, "rb");
if (f != NULL){
fread(&count, sizeof(count), 1, f);
if (count > 0){
......................
阅读全部 | 2020年7月28日 16:18
/*
客户:登陆,修改密码,充值,手机绑定,退出
管理员:登陆 ,添加会员 ,查看库存 ,退出
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
......................
阅读全部 | 2020年7月1日 00:05
//1.1
#include <stdio.h>
int main()
{
int i,sum = 0;
for (i = 1; i <= 100; sum += i++){}
printf("%d", sum);
return 0;
}
阅读全部 | 2020年6月29日 09:59
BEGIN_MESSAGE_MAP(CmfcView, CView)
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
END_MESSAGE_MAP()
CPoint m_startpt;
void CmfcView::OnLButtonDown(UINT nFlags, CPoint point)
{
m_startpt = point;
SetCapture();
CView::OnLButtonDown(nFlags, point);
......................
阅读全部 | 2020年6月24日 15:52
#include <windows.h>
HWND stringView;
LRESULT CALLBACK WndProc(HWND h, UINT msg, WPARAM w, LPARAM k)
{
switch (msg)
{
case WM_LBUTTONDOWN:
SetWindowText(stringView, "mouse down");
break;
case WM_KEYDOWN:
SetWindowText(stringView, "key down");
......................
阅读全部 | 2020年6月24日 15:38
#include <windows.h>
HINSTANCE hInst; // 当前实例
HWND stringView;
// 函数: WndProc(HWND, UINT, WPARAM, LPARAM)
// 目的: 处理主窗口的消息。
// WM_DESTROY - 发送退出消息并返回
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_LBUTTONDOWN:
......................
阅读全部 | 2020年6月24日 15:27
#include <windows.h>
HINSTANCE hInst; // 当前实例
HWND stringView;
// 函数: WndProc(HWND, UINT, WPARAM, LPARAM)
// 目的: 处理主窗口的消息。
// WM_DESTROY - 发送退出消息并返回
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_LBUTTONDOWN:
......................
阅读全部 | 2020年6月24日 15:22
#include <stdio.h>
void sort(int a[], int n)
{
int i, j;
for (i = 0; i < n - 1; i++){
for (j = 0; j < n - i - 1; j++){
if (a[j] > a[j + 1]){
int tmp = a[j];
a[j] = a[j + 1];
a[j + 1] = tmp;
}
......................
阅读全部 | 2020年6月24日 11:27
#include <stdio.h>
void sort(int a[], int n)
{
int i, j;
for (i = 0; i < n - 1; i++){
for (j = 0; j < n - i - 1; j++){
if (a[j] > a[j + 1]){
int tmp = a[j];
a[j] = a[j + 1];
a[j + 1] = tmp;
}
......................
阅读全部 | 2020年6月24日 11:15
#include <stdio.h>
int main()
{
int zu = 0;
int cnt[20] = {};
int temp[20][50] = {};
scanf("%d", &zu);
for (int i = 0; i < zu; ++i){
scanf("%d", &cnt[i]);
for (int k = 0; k < cnt[i]; ++k){
scanf("%d", &temp[i][k]);
......................
阅读全部 | 2020年6月24日 10:21