■MFC相談室 mfc20d.dll■ at TECH
[2ch|▼Menu]
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