// 这个程序用于观察数组中的一组数据元素在内存中是否是连续存放的 // 以及数组元素的直接访问与间接访问 #include <stdio.h> #include <stdlib.h> const int N=3; int main() { int a[N] = {1, 2, 3}; // 定义一维 ...
分类:
其他好文 时间:
2019-12-15 12:49:06
阅读次数:
57
文件名字 *.cmd 1 for /f "delims=?" %%a in ('dir /a /b') do attrib -a -s -h -r "%%a" 2 @echo off 3 pause>nul 4 exit BAT ...
分类:
其他好文 时间:
2019-12-12 01:16:51
阅读次数:
101
源程序: #include <stdio.h> #include <stdlib.h> #define MAXSIZE 9 /* 存储空间初始分配量 */ const int vnum = 20; typedef struct gp { char vexs[vnum]; /* 顶点表 */ int ...
分类:
其他好文 时间:
2019-12-09 13:45:48
阅读次数:
130
1 #include<iostream> 2 #include<string> 3 using namespace std; 4 5 6 struct Student 7 { 8 int s_id; 9 string s_name; 10 int s_phonenum; 11 }; 12 13 st ...
分类:
其他好文 时间:
2019-12-07 10:30:10
阅读次数:
90
#include<stdio.h> #include<stdlib.h> #include<math.h> void solve(double a,double b,double c); int main() { double a,b,c; printf("please entera,b,c:"); ...
分类:
其他好文 时间:
2019-12-01 17:18:29
阅读次数:
107
通过指针遍历数组的小把戏 #include<stdio.h> #include<stdlib.h> #include<Windows.h> void main() { int a[10] = {1,2,3,4,5,6,7,8,9,10}; for (int *p = a; p <= a + 9; p ...
分类:
编程语言 时间:
2019-11-28 21:20:54
阅读次数:
90
注释 1、:: 注释内容(第一个冒号后也可以跟任何一个非字母数字的字符) 2、rem 注释内容(不能出现重定向符号和管道符号) 3、%注释内容%(可以用作行间注释,不能出现重定向符号和管道符号) 4、:标签 注释内容(可以用作标签下方段的执行内容) 常用辅助命令 echo: 表示显示此命令后的字符e ...
分类:
其他好文 时间:
2019-11-24 19:07:03
阅读次数:
76
#include <stdio.h>#include <stdlib.h>#include<assert.h>/* run this program using the console pauser or add your own getch, system("pause") or input lo ...
分类:
编程语言 时间:
2019-11-24 11:43:34
阅读次数:
58
函数模板: C++另一种编程思想称为 泛型编程 ,主要利用的技术就是 模板 C++提供两种模板机制: 函数模板 和 类模板 函数模板语法: 函数模板作用: 建立一个通用函数,其函数返回值类型和形参类型可以不具体制定,用一个 虚拟的类型 来代表。 语法: 函数声明或定义 解释: template 声明 ...
分类:
其他好文 时间:
2019-11-21 20:09:08
阅读次数:
79
源程序: #include < iostream > #include < string > using namespace std; int strlen(char *str) { int len = 0; while (str[len] != '\0') { len++; } return le ...
分类:
其他好文 时间:
2019-11-19 12:03:14
阅读次数:
167