■MFC相談室 mfc20d.dll■at TECH
■MFC相談室 mfc20d.dll■ - 暇つぶし2ch206:デフォルトの名無しさん
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