2011-04-01から1ヶ月間の記事一覧

Visual C++ 2010 Express で x64 環境を構築する。

Windows 7 Visual C++ 2010 Express x64 ビルド環境構築 - 日々のコーディングについてのページ こちらのサイトの丸写し状態だが…。 Visual C++ 2010 Express はインストールされているものとして、以下の手順を踏む。 Microsoft Windows SDK for Windows 7 …

32回以上左シフトするには、左辺を64bit整数型にする。

int _tmain(int argc, _TCHAR* argv[]) { int rhs32 = 63; __int64 rhs64 = 63; // NG { __int64 flags = 1 << rhs32; printf("%llx\n", flags); } // OK { __int64 flags = static_cast<__int64>(1) << rhs32; printf("%llx\n", flags); } // NG { __int64 flags = 1 </__int64>…

boolのアラインメント

#include <stdio.h> struct BoolAlign { bool _bool0; int _int0; bool _bool1; bool _bool2; int _int1; bool _bool3; bool _bool4; bool _bool5; int _int2; bool _bool6; bool _bool7; short _short0; bool _bool8; short _short1; bool _bool9; int _int3; }; int</stdio.h>…

コンストラクタを含む構造体は初期化子リストで初期化出来ない。

C++

struct DATA { int _hoge; int _fuga; int _piyo; DATA() : _hoge(0) , _fuga(0) , _piyo(0) {} }; int main() { // error C2552 DATA data[3] = { { 1, 1, 1 }, { 2, 2, 2 }, { 3, 3, 3 }, }; return 0; } Download Visual Studio 2005 Retired documentati…

VisualC++のmlに/omfを指定するとリンクは行われない。

アセンブラに興味がわいた為、昔買って本棚のこやしになっていた高級言語プログラマのためのアセンブラ入門作者: 林晴比古出版社/メーカー: ソフトバンク クリエイティブ発売日: 2005/11/30メディア: 単行本購入: 2人 クリック: 40回この商品を含むブログ (1…