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

📄 emp1_08.cpp

📁 该包是数据结构的实验软件,来源于合肥工业大学人工智能与数据挖掘实验室,用来实现数据结构.
💻 CPP
字号:
//   {emp1_08}
#include"tools.h"

long int LI;
   void   InputLongIntInWnd(int x1,int y1,int x2,string  s0,long int& LI )
    {   char *endptr;

      gwindow gwnd;

       Gwindow_init(gwnd,x1,y1,x2,y1);
       Gwindow_newwindow(gwnd);
       unsigned char sss[70]="";
       strcpy(sss,s0);
       int n=gwnd.x2-gwnd.x1-strlen(s0);
	do
	{

	 unsigned char s1[70]="";
	 Gwindow_showstring(gwnd,1,1,sss);

	 Gwindow_inputstring(gwnd,1+strlen(sss),1,s1);
	 unsigned char  s2[70]="";
	  Rtrim(s1,s2);
	 unsigned char  s3[70]="";
	  Ltrim(s2,s3);
	  LI=strtol(s3,&endptr,10);
	  if(*endptr!='\0')
	     {Error("format of data error,input again!");
	      Gwindow_clear_line(gwnd,1);
	      }
	  }
       while( !(*endptr=='\0') );

       Gwindow_done(gwnd);


     }

     main()
     {
      Into_graph();
      InputLongIntInWnd(10,10,40,"输入长整型数据:",LI);

	cout<<LI<<endl;
	  getch();
   }

⌨️ 快捷键说明

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