看板 NIUECE91 關於我們 聯絡資訊
※ [本文轉錄自 C_and_CPP 看板] 作者: ccclum (我好像很閒??) 看板: C_and_CPP 標題: [問題] overflow 時間: Thu Sep 28 18:47:48 2006 #include <vcl.h> #include <stdio.h> #include <math.h> #pragma hdrstop #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" #define width 512 #define height 512 #define PI 3.14159265 TForm1 *Form1; long SizeOfImage; unsigned char *pic; int graylevel[height][width]; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { int YY[512][512]; int XX[512][512]; } 我的程式碼就只是宣告兩個陣列 為什麼會產生overflow? 圖:http://0rz.net/ca1TI PS.在borlandC 6.0環境下 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 134.208.0.111 ※ 編輯: ccclum 來自: 134.208.0.111 (09/28 18:54) ※ 編輯: ccclum 來自: 134.208.0.111 (09/28 19:00) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 134.208.0.111
kewang:你應該用step by step的方式debug 要不然不知道是哪一行 09/28 20:03
kewang:stack overflow 09/28 20:03