⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show.cpp

📁 chatServer.exe ------服务端安装包。 ------安装后执行桌面上的Chat服务
💻 CPP
字号:
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
#include<windows.h>
#include <time.h> 

void load();      /*加载聊天信息*/
void exi();       /*进程监控功能前半段*/
char temp[255]="zhangzehua";            /*初始化聊天信息*/
char test[255];                         /*聊天信息内容变量*/
int pd=0;
main()
{
      system("title 聊天信息-C chat system Client");
      for(;;)
      {load(); exi(); Sleep(100);}
}
void load()
{
    long num=0,i;
    FILE *fp,ffp;
    int k;
    char tt[255];
    if(pd>=20)
     system("title 聊天信息-C chat system Client");
    if((fp=fopen("w:\\data.dat","rb"))!=NULL)              /*加载内容*/
     {
       fscanf(fp,"%s",test);
       fclose(fp);
       k=strcmp(temp,test);
       if(k!=0)            /*判断内容*/
       {
       system("title 有新信息-C chat system Client");
       printf("%s\n",test);
       strcpy(temp,test);
       pd=0;
       }
       if(k==0)
       pd++;
     }
     else return;
}
void exi()
{
     FILE *fp;
     int k=0;
     char tt[255];
     if((fp=fopen("c:\\windows\\win.s","wb"))!=NULL)
     {fprintf(fp,"%d\r\n",rand()%5000); fclose(fp); return;}           /*随即输入流*/
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -