Created
February 8, 2015 11:34
-
-
Save ufcpp/ff56796ebd149c2030cf to your computer and use it in GitHub Desktop.
variable initialization in C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct X | |
{ | |
X() {} | |
}; | |
void main() | |
{ | |
X x(); // X 型の変数 x に対して、コンストラクター X() で初期化 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
×
// X 型の変数 x に対して、コンストラクター X() で初期化
○
// 引数を取らず、X 型を返す関数 x の宣言