■MFC相談室 mfc20d.dll■
at TECH
206:デフォルトの名無しさん
09/01/18 16:01:41
日付や時間を取得したいけどエラーがでてしまうんです・・・
内容は
Run-Time Check Failure #3 - The variable 'newtime' is being used without being initialized.
afx_msg void CMainWin::OnTime()
{
char str[80];
CTime Curtime = CTime::GetCurrentTime();
struct tm *newtime;
newtime = Curtime.GetLocalTm(newtime); //ここが問題
wsprintf(str,asctime(newtime));
str[strlen(str) - 1] = '\0';
MessageBox(str,"Time and Date");
}
URLリンク(msdn.microsoft.com)(VS.80).aspx
ここ見る限りじゃ間違いないと思うんだけどなあ・・・
指摘と改善お願いします。。。
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5493日前に更新/106 KB
担当:undef