📄 util.c
字号:
#include <windows.h>#include "all.h"#include "util.h"#include <stdlib.h>#ifndef MAXINT#undef MAXINT#define MAXINT 32767.#endifFloat *NewFloat (int N) {/* Allocate array of N Floats */ Float *temp; temp = (Float *) malloc( N * sizeof (Float)); return temp;}typedef Float *pFloat;Float **NewFloatMatrix (int N, int M) {/* Allocate NxM matrix of Floats */ Float **temp; int i;/* allocate N pointers to Float arrays */ temp = (pFloat *) malloc( N * sizeof (pFloat)); if (!temp) {
return temp; }/* Allocate a Float array M long for each of the N array pointers */ for (i = 0; i < N; i++) { temp [i] = (Float *) malloc( M * sizeof (Float)); if (! temp [i]) {
return temp; } } return temp;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -