#include <stdio.h>
#define N 200
#define SIZE 400
int a[N][SIZE] = {{1, 1}, {1, 2}, {1, 6}};
void Init(int n)
{
int i, j = 1, temp = 0;
for (i = a[n-1][0];i > 0;--i)
......................
阅读全部
|
azzbcc
贴于 2013年3月31日 00:10
hide
bbsi
Compiling...
ycsf.cpp
f:\迅雷下载\新建文件夹 (2)\microsoft visual studio\myprojects\sxt\ycsf.cpp(11) : fatal error C1083: Cannot open include file: 'ga.h': No such file or directory
执行 cl.exe 时出错.
sxt.exe - 1 error(s), 0 warning(s)
这是什么原因?初学者,看不懂,请高人帮忙!
阅读全部
|
sxt0928
贴于 2013年3月28日 23:03
hide
bbsi
#include<iostream>
using namespace std;
int _del(int* a) //處理函數
{int i;
int flat=1;
for( i=0; i<20; i++)
{
if(a[i]==1 && i<8 ) //處理連續的小字
{
if(a[i+1]>0 && a[i+2]>0)
{ a[i]--; a[i+1]--; a[i+2]--;}
else {flat=0; break;}
......................
阅读全部
|
qunxingw
贴于 2013年3月28日 22:59
hide
bbsi
#include<iostream>
using namespace std;
int main(){
int a[10];
void num(int m,int k,int b[]);
int i,j,t;
cin>>i;
cin>>j;
/*num(i,j,a);*/
for(t=0;t<=j-1;t++){
num(i,j,a);
cout<<a[t];
......................
阅读全部
|
L行O影V不E黎
贴于 2013年3月28日 12:54
hide
bbsi
#include <stdio.h>
int main()
{
int a,b,c,d,e;
e=(a+b+c+d)/4;
scanf("%d%d%d%d\n",&a,&b,&c,&d);
printf("%f\n",e);
return 0;
}
阅读全部
|
ch12345
贴于 2013年3月27日 22:11
hide
bbsi
//reference : <<Effective C++>> (Third Edition) [美]Scott Meyers 著.侯捷 翻译
/*
泛化copy构造函数
*/
template<class T>
class SmartPtr{
public:
template<typename U>
SmartPtr(const SmartPtr<U>& other)
:heldPtr(other.get()){/**/}
T* get()const{return heldPtr;}
private
......................
阅读全部
|
xyz2013
贴于 2013年3月27日 18:22
hide
bbsi
fftimage=fftshift(fft2(double(I))); % 对条纹图像 I 进行二维傅里叶变换
figure,plot(mat2gray(abs(fftimage(257,:)))); % 显示频谱图
arrinput = ginput; % 鼠标选取高低频之间的波谷位置,点一下,按回车
arrtemp = fftimage(257,:);
[FringeMax,FringeMaxIndex] = max(arrtemp(arrinput(1,1):512));
% 得到从选取点开始向右的最大值(波峰),并记录位置
FringeMaxIndex = round(arrinput(1,1) + FringeMaxIndex - 1);
% 得到 1 级谱(基频)的波峰位置
maxvalue=max(fftimage(257,FringeMaxIndex:512));
% 取出 1 级谱的位置。257 表示第 257 行(中间行,谱的位置)
[m,n]=find(fftimage==maxvalue); % 取出 1 级谱最大值位置
fringe_num=abs(n-m); % 确定条纹个数
......................
阅读全部
|
shdlgjmm2007
贴于 2013年3月27日 14:50
hide
bbsi
#include <stdio.h>
#include <string.h>
int search(char* sourcestr,char* substr)
{
if(substr==NULL) return 0;
int ret=0;
char* begin=sourcestr;
while(*begin!='\0')
{
if(strstr(begin,substr)!=NULL && begin==strstr(begin,substr)) ret++;
begin++;
}
......................
阅读全部
|
wp231957
贴于 2013年3月27日 09:24
hide
bbsi
#define PT 5.5
#define S(x) PT*x*x
#include<stdio.h>
main()
{
int a=1,b=2;
printf("%4.1f\n",S(a+b));
}
阅读全部
|
熙子
贴于 2013年3月26日 20:49
hide
bbsi