- 博客(6)
- 资源 (3)
- 收藏
- 关注
转载 strcpy strncpy strcmp strlen strcat函数
strcpy函数:char *strcpy(char *Dest , const char *Src){ assert((Dest != NULL) && (Src != NULL)); char *address = Dest; while((*Dest++ = *Src++) != '\0') NULL; return...
2019-02-26 14:21:49 362
原创 C语言常用排序算法---冒泡排序,选择排序,快速排序
冒泡排序:两两之间进行比较,把大的移到后面,每轮比较之后之后一个就是最大的#include<stdio.h>#include<assert.h>#include<stdlib.h.h>//从头向尾遍历//相邻两数进行比较//将最大数(相对)沉入尾部(相对)void BubbleSort1(int *arr,int sz){...
2019-02-26 14:01:31 719
原创 C语言经典著作导读
基础篇1.《写给大家看的C语言书(第2版)》点击打开链接 原书名: Absolute Beginner's Guide to C (2nd Edition) 原出版社: Sams 作者: (美)Greg Perry [作译者介绍] 译者: 谢晓钢 刘艳娟 丛书名: 图灵程序设计丛书 C/C++系列 出版社:人民邮电出版社 ISBN:97871152163...
2019-02-20 14:09:28 507
原创 C#判断一个string是否为数字
方案二:正则表达式(推荐)using System.Text.RegularExpressions;a)public static bool IsNumeric(string value){ return Regex.IsMatch(value, @"^[+-]?\d*[.]?\d*$");}public static bool IsInt(string value...
2019-02-14 23:45:00 4849 1
转载 C# 中怎么将string转换成int型
int intA = 0;1.intA =int.Parse(str);2.int.TryParse(str, out intA);3.intA = Convert.ToInt32(str);以上都可以,其中 1和3 需要try{}异常,2不需要。 TryParse() Usage1:int number;bool result = Int32.TryParse(value, ...
2019-02-14 23:41:37 4049
转载 C#中WinForm程序退出方法技巧总结
C#中WinForm程序退出方法技巧总结 一、关闭窗体 在c#中退出WinForm程序包括有很多方法,如:this.Close(); Application.Exit();Application.ExitThread(); System.Environment.Exit(0); 等他们各自的方法不一样,下面我们就来详细介绍一下。 1.this.Close(); 只是关闭当前窗口,若...
2019-02-14 23:39:52 278
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人