引用 | 編輯
ice-m6
2007-04-23 18:08 |
樓主
▼ |
||
x0
期末的作業哪上來和大家分享吧寫的不是很好大家多多見諒 #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; .. 訪客只能看到部份內容,免費 加入會員 x0
|
引用 | 編輯
kdliang03122
2008-04-26 14:41 |
2樓
▲ ▼ |
stdafx.h ?
什麽文件? x0 |
引用 | 編輯
kevin11671
2008-10-25 17:59 |
5樓
▲ ▼ |
編譯有報錯!?
我用的是DEV-C++ 我有試過把VC的頭文件刪掉 還有把void main 改成 int main 但是我還沒看下面的錯誤 是DEV-C++ 的問題嗎?? 解答一下?? x0 |
引用 | 編輯
overing
2008-10-25 21:36 |
6樓
▲ ▼ |
引用vc的標頭檔就表示整份程式中有使用到該標頭檔中定義的項目
你只是把標頭檔拿掉當然解決不了問題 應該上網找找有沒有那份標頭檔能下載 或是找找dev cpp有沒有可以替代的標頭檔來用 x0 |
引用 | 編輯
39721115
2009-12-12 17:46 |
9樓
▲ ▼ |
請問可以提供可編譯的原始程式嗎?
本人是想用於專題請大大提供編譯原始程式? 我有C++Builder 6 和 Dev-C++兩款軟體 x0 |
引用 | 編輯
steven780413
2010-01-03 01:52 |
10樓
▲ ▼ |
剛好我們的期末作業也要寫一個程式
拿來參考看看 感謝 x0 |
引用 | 編輯
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_) x0 |