| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

「Windows Mobile 乱数のSeedを生成する」の版間の差分

提供: MyMemoWiki
ナビゲーションに移動 検索に移動
 
(同じ利用者による、間の1版が非表示)
1行目: 1行目:
==Windows Mobile 乱数のSeedを生成する==
+
==[[Windows Mobile 乱数のSeedを生成する]]==
[[Windows Mobile]]{{category コード片}}
+
[[Windows Mobile]] | [[Category:コード片]]
  
*[Windows Mobile 6 VisualStudio2005 で time 関数が使えない] [Visual Studio 環境では、time関係の関数が利用できない]
+
*[[Windows Mobile 6 VisualStudio2005 で time 関数が使えない|Visual Studio 環境では、time関係の関数が利用できない]]
  
===対応策(MFC)===
+
===対応策([[MFC]])===
 
  SYSTEMTIME st;
 
  SYSTEMTIME st;
 
  GetSystemTime(&st);
 
  GetSystemTime(&st);
 
  CTime ct = CTime(st);
 
  CTime ct = CTime(st);
 
  srand((unsigned)ct.GetTime());
 
  srand((unsigned)ct.GetTime());

2020年2月16日 (日) 04:34時点における最新版

Windows Mobile 乱数のSeedを生成する

Windows Mobile |

対応策(MFC)

SYSTEMTIME st;
GetSystemTime(&st);
CTime ct = CTime(st);
srand((unsigned)ct.GetTime());