引用 | 编辑
ice-m6
2007-04-23 18:08 |
楼主
▼ |
||
![]() 写的不是很好大家多多见谅 #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <time.h> #define N 3 void make_array(void); void put_array(void); int a; void main(void) { int i,j,c,f,temp; char xy; make_array(); //做出乱数阵列 printf("请用w、s、a、d来代表上下左右来移动\n"); do{ for(i=0;i<N;i++) { for(j=0;j<N;j++) { if(a==9) //找出空格的所在 { xy=getch(); if(xy==97) //如果按4的话跟右边的交换 { f=j+1; if(f>2) //如果是最旁边了会跳出 { printf("他已是最边边了请换个方向吧\n"); put_array(); break; } else //如果不是最边边两边互换 { temp=a; a=a; a=temp; put_array(); //再列出阵列 break; } } else if(xy==100) //如果按6的话跟左边的交换 { f=j-1; if(f<0) { printf("他已是最边边了请换个方向吧\n"); put_array(); break; .. 访客只能看到部份内容,免费 加入会员 ![]()
|
引用 | 编辑
kdliang03122
2008-04-26 14:41 |
2楼
▲ ▼ |
stdafx.h ?
什么文件? ![]() ![]() |
引用 | 编辑
kevin11671
2008-10-25 17:59 |
5楼
▲ ▼ |
![]() ![]() ![]() ![]() 我用的是DEV-C++ 我有试过把VC的头文件删掉 还有把void main 改成 int main 但是我还没看下面的错误 是DEV-C++ 的问题吗?? 解答一下?? ![]() |
引用 | 编辑
overing
2008-10-25 21:36 |
6楼
▲ ▼ |
引用vc的标头档就表示整份程式中有使用到该标头档中定义的项目
你只是把标头档拿掉当然解决不了问题 应该上网找找有没有那份标头档能下载 或是找找dev cpp有没有可以替代的标头档来用 ![]() |
引用 | 编辑
39721115
2009-12-12 17:46 |
9楼
▲ ▼ |
请问可以提供可编译的原始程式吗?
本人是想用于专题请大大提供编译原始程式? 我有C++Builder 6 和 Dev-C++两款软体 ![]() |
引用 | 编辑
steven780413
2010-01-03 01:52 |
10楼
▲ ▼ |
刚好我们的期末作业也要写一个程式
拿来参考看看 感谢 ![]() ![]() |
引用 | 编辑
csr
2011-03-25 21:49 |
14楼
▲ |
我用dev c++ 4992无法编译成功
谢谢 stdafx.h如下 它是用在32位元的标头档 dev c++无法编译 // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if !defined(AFX_STDAFX_H__95A22328_E88B_4D3B_A685_BEA5355785AE__INCLUDED_) #define AFX_STDAFX_H__95A22328_E88B_4D3B_A685_BEA5355785AE__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxdisp.h> // MFC Automation classes #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__95A22328_E88B_4D3B_A685_BEA5355785AE__INCLUDED_) ![]() |