以下便是 MFCCON.CPP 內容: #0001 // File : MFCCON.CPP #0002 // Author : J.J.Hou / Top Studio #0003 // Date : 1997.04.06 #0004 // Goal : Fibonacci sequencee, less than 100 #0005 // Build : cl /MT mfccon.cpp (/MT means Multithreading) #0006 #0007 #include <afx.h> #0008 #include <stdio.h> #0009 #0010 int main() #0011 { #0012 int lo, hi; #0013 CString str; #0014 CStdioFile fFibo; #0015 #0016 fFibo.Open("FIBO.DAT", CFile::modeWrite | #0017 CFile::modeCreate | CFile::typeText); #0018 #0019 str.Format("%s\n", "Fibonacci sequencee, less than 100 :"); #0020 printf("%s", (LPCTSTR) str); #0021 fFibo.WriteString(str); #0022 #0023 lo = hi = 1; #0024 #0025 str.Format("%d\n", lo); #0026 printf("%s", (LPCTSTR) str); #0027 fFibo.WriteString(str); #0028 #0029 while (hi < 100) #0030 { #0031 str.Format("%d\n", hi); #0032 printf("%s", (LPCTSTR) str); #0033 fFibo.WriteString(str); #0034 hi = lo + hi; #0035 lo = hi - lo; #0036 } #0037 #0038 fFibo.Close(); #0039 return 0; #0040 }
南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.