我先貼上一版的代碼,版主有空幫看看哪裡會導致內存資料會被覆蓋的問題.新版的還沒寫完.
StdAfx.h
stdafx.cpp
StdAfx.h
程序代码:
// 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__3652E740_3773_441A_9233_942284587DB6__INCLUDED_) #define AFX_STDAFX_H__3652E740_3773_441A_9233_942284587DB6__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> #include <time.h> #include <io.h> #include <sys/stat.h> #define IC 1024//16384 #define A 2048 #define B 1024 #define C 8 #define Max_Size 256 #define Min_Size 32 extern char FileList[Max_Size][Max_Size]; extern unsigned int FileCount; extern float TestResult[IC][B]; extern int My_Max_x; extern int My_Max_y; extern int My_Min_x; extern int My_Min_y; extern int ErrorCoord; extern time_t start_tm,finish_tm; #define Test_policy "Never merge tests with identical test number if test name not matching" #define Outlier_removal "None (keep all data)" #define Statistics_computation "From samples data (if any)- otherwise from summary" #define Binning_computation "From summary data (if any)- otherwise from samples" #define Cp_Cpk_computation "Use standard Sigma formula" #define Mean_drift_formula "Percentage of value drift" #define Parts_processed "All Data / parts (any Bin)" #define Data_from_Site "All sites" #define FOREGROUND_WHITE (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY) // TODO: reference additional headers your program requires here //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__3652E740_3773_441A_9233_942284587DB6__INCLUDED_)
stdafx.cpp
程序代码:
// stdafx.cpp : source file that includes just the standard includes // Analysis.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file char FileList[Max_Size][Max_Size]={0}; unsigned int FileCount=0; float TestResult[IC][B]={0}; int My_Max_x=0; int My_Max_y=0; int My_Min_x=0; int My_Min_y=0; time_t start_tm=0; time_t finish_tm=0; int ErrorCoord=0;
不要選我當版主