推介:| 修理頂蓬布 | Mediator course | Hypnosis course | Dream Interpretation | NLP | English course |

發新話題
打印

[疑難] 請留意以下的C語言程式

請留意以下的C語言程式

#include<Windows.h>
#include<string>
int main(int argc, char*argv[])
{
    char Path[255];
    char FileName[255];
    char Data[512]="---------------------by 花之慶次---------------------------\r\n--------http://www.xocat.com--------";
    for(int i=0; i<10; i++)
    {
            GetWindowsDirectory(Path, sizeof(Path));
            wsprint(FileName,"\\%d.txt",i);
            strcat(Path,FileName);
            HANDLE hFile;
            hFile=CreateFile(Path, GENERIC_WRITE,0,NULL, CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
            if(hFile==INVALID_HANDLE_VALUE)
            {
                                           continue;
                                           }
                                           DWORD dwWrite;
                                           WriteFile(hFile, &Data, strlen(Data), &dwWrite, NULL);
                                           CloseHandle(hFile);
                                           memset(Path, 0x00,255);
                                           memset(FileName, 0x00,255);
    }                                                                     
    return 0;
}


其中這個程式好像出現了問題:
wsprint(FileName,"\\%d.txt",i);
其內容如下:
In function'int main(int, char**)';
'wsprint'undeclared(first use this function)
Each undeclared identifier is reported only once for each function it appears in.)

那我應該怎麼辦???

本篇文章来源于 黑客手册技术论坛
原文链接:http://nohack.cn/bbs/thread-75958-1-1.html

TOP

該是wsprintf吧!
IT代工/鎗手一名!
小弟並唔平, 但絕唔係貴!

TOP

Well, there are many reference and learning material online

TOP

引用:
原帖由 jayzhou_2046 於 2008-4-14 10:40 發表
該是wsprintf吧!
終於成功!!!
不過如果將以上的程式改為用Java會不會又成功呢??

TOP

直接該JavaScript肯定不行。你用的CRT

TOP

發新話題


重要聲明:本討論區是以即時上載留言的方式運作,本網站對所有留言的真實性、完整性及立場等,不負任何法律責任。而一切留言之言論只代表留言者個人意見,並非本網站之立場,用戶不應信賴內容,並應自行判斷內容之真實性。於有關情形下,用戶應尋求專業意見(如涉及醫療、法律或投資等問題)。由於本討論區受到「即時上載留言」運作方式所規限,故不能完全監察所有留言,若讀者發現有留言出現問題,請聯絡我們。本討論區有權刪除任何留言及拒絕任何人士上載留言,同時亦有不刪除留言的權利。切勿撰寫粗言穢語、誹謗、渲染色情暴力或人身攻擊的言論,敬請自律。本網站保留一切法律權利。


Copyright 1997- Xocat. All Right Reserved.