搜索资源列表
用c编写的N*N的螺旋矩阵源代码
- /* 实现效果: 1 2 6 7 15 3 5 8 14 16 4 9 13 17 22 10 12 18 21 23 11 19 20 24 25 */ #include <stdio.h> #define N 5 //阶数,即N*N的螺旋矩阵 void main() { int i, j, num=1, a[N][N]; for(i=0; i<=N/2; i++) &nb
stdio-common
- 绝对正真的stdio.h的实现,从原始的io角度看待自己所编写的c指令,对以后c的深入研究大有裨益。-absolute stdio.h is really the realization of the original from the perspective of their io prepared by the c direction right after c-depth study of great benefit.
布线问题(分支限界算法应用)
- 六 程序实现: #include <stdio.h> typedef struct { int row int col }Position int FindPath (Position start, Position finish, int &PathLen, Position *&path) { //计算从起始位置start到目标位置finish的最短布线路径,找到返回1,否则,返回0 int i if ((start.row =
gads
- #include <stdio.h> unsigned long int crc32_table[256] unsigned long int ulPolynomial = 0x04c11db7 unsigned long int Reflect(unsigned long int ref, char ch) { unsigned long int value(0) // 交换bit0和bit7,bit1和bit6,类推 for(int i = 1
huidu
- #include \"stdio.h\" #include \"malloc.h\" #define TRUE 1 #define n 39 #define max 500 typedef struct { char p[n] float w[n][n] }graph graph *ga2 int visit[n] int path[n][n] float C[n][n] float A[n][n] -#includ
fstreamsrc
- 《使用 <fstream> 类进行文件的 I/O 处理》 传统的文件 I/O 库如 Unix 的 <io.h> 和 <stdio.h> ,由于其程序接口的原因,在很大程度上强制程序员进行某些处理,缺乏类型安全和国际化支持。C++ 的 <fstream> 库则在文件的 I/O 方面提供了一个增强的、面向对象的、具有国际化意识的库。该程序介绍如何使用这个库进行文件的 I/O 处理并利用它来编写易于跨平台的代码。 大多数 C++ 程序员都熟悉不止
this-is-a-sound-code-of-image-enhancement-based-on
- 小波变换的C源代码 #define N0 128 #include \"stdio.h\" #include \"stdlib.h\" #include \"math.h\" #include \"string.-wavelet transform C source code # define N0 128 # include "stdio. h "# include" stdlib.h "# include" math.h
ghgl
- #include <stdio.h> #include <stdlib.h> #define N 3 struct huowu {char num[10] char name[8] int money[3] int amount[3] }huo[N],temp -# include
332658
- #include <stdio.h> #include <string.h> #include <stdlib.h> #include <malloc.h> #include <math.h> #include <conio.h> struct DuLNode{ struct DuLNode *prior int data struct DuLNode *next-# in
tu
- [输入] 图的顶点个数N,图中顶点之间的关系及起点A和终点B [输出] 若A到B无路径,则输出“There is no path” 否则输出A到B路径上个顶点 [存储结构] 图采用邻接矩阵的方式存储。 [算法的基本思想] 采用广度优先搜索的方法,从顶点A开始,依次访问与A邻接的顶点VA1,VA2,...,VAK, 访问遍之后,若没有访问B,则继续访问与VA1邻接的顶点VA11,VA12,...,VA1M,再访问与VA2邻接顶点...,如此下去,直至找到B,最先到达
4
- 学会对文件的记录锁定,及解锁。#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int fd int i struct { char name[20] uint ID int age } myrec fd =open(\"name\", O_RDWR|O_CREAT, 0755)
mir2HOOKcode
- #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define WIN32_LEAN_AND_MEAN #define LOGFILE \"C:\\\\hookwsock.log\" #include \"stdio.h\" #include #include /*// IEXPLORE Droiyan Online \"IEFrame\
process
- #include <string.h> #include <fstream.h> #include <stdio.h> #include <stdlib.h> #define FINISH 0 //完成状态 #define RUNNING 1 //运行状态 #define READY 2 //就绪状态 #define WAITIO 3 //io等待状态 #define WAITREAD 4//读写等待状态
moneymanagementsystem
- 家 庭 财 务 管 理 小 程 序 程序源代码: /*money management system*/ #include \"stdio.h\" #include \"dos.h\" main() { FILE *fp struct date d float sum,chm=0.0 int len,i,j=0 int c
魔方阵的问题求解
- #include"stdio.h" #include"stdlib.h" int main() { int i ,j,a[100][100],n,k,flag=1; while(scanf("%d",&n)!=EOF&&(n%2!=0)) { for(i=0;i<n;i++) for(j=0;j<n;j++) a[i][j]=0; j=n/2; a[0][j]=1; i=0
debugmalloc
- #include <stdlib.h> #include <string.h> #include <stdio.h> //#include <iostream> #include "debugmalloc.h" #include "dmhelper.h" /*Define the macro */ #define ALIGN 8 #define FENCE 0xDEADBEEF #define HE
cc
- 分析的是实例 #include<stdio.h> #include<stdlib.h> typedef struct BST* tree_pointer //定义数据类型 typedef struct BST{ int key tree_pointer left tree_pointer right }BST tree_pointer CreateBST(tree_pointer root, int data)
ds18b20
- #include<reg51.h> #include<absacc.h> #include<stdio.h> #include<math.h> #define uchar unsigned char #define uint unsigned int sbit P00=P0^0 sbit P01=P0^1 sbit P02=P0^2 sbit P03=P0^3 sbit P04=P0^4 sbi
PlayCap
- 采用window的SDK ,使用VC6.0 采用C++写的一段 DirectShow sample code。 适合USB摄像头,需要一些头文件。如下: #include <atlbase.h> #include <windows.h> #include <dshow.h> #include <stdio.h>-With window of the SDK, use the VC6.0 C++ written by a Direct
c-P-P-lexical-analysis
- c++词法分析很简单的代码#include<iostream.h> #include<fstream.h> #include<stdlib.h> #include<stdio.h> #include<string.h> #include<conio.h> #include<process.h> /*头文件*/ -c++ lexical analysis is very simple c