| 发表于:2007-07-26 16:42:50 楼主 |
#include <afx.h> #include <stdio.h> int main() { int lo,hi; cstring str; cstdiofile ffibo; ffibo.open( "fibo.dat ",cfile::modewrite ¦cfile::modecreate ¦cfile::typetext); str.format( "%s\n ", "fibonacci squencee,less than 100: "); printf( "%s ",(lpctstr)str); ffibo.writestring(str); lo=hi=1; str.format( "%d\n ",lo); printf( "%s ",(lpctstr)str); ffibo.writestring(str); while(hi <100) { str.format( "%d\n ",hi); printf( "%s ",(lpctstr)str); ffibo.writestring(str); hi=lo+hi; lo=hi-lo; } ffibo.close(); return 0; } 这是从侯大师的书上找的 p36 可是调试时有这样的错误: fatal error c1189: #error : building mfc application with /md[d] (crt dll version) requires mfc shared dll version. please #define _afxdll or do not use /md[d] 不知道是什么意思 ??? |
|
|
|
|