クラスとの違いがあんまないんだなぁ。
サンプル
#include <iostream.h> struct Complex { Complex( int nRe=0, int nIm=0 ) { m_nRe = nRe; m_nIm = nIm; } int m_nRe; int m_nIm; }; void main() { Complex C0; Complex C1( 123 ); Complex C2( 123, 456 ); cout << "C0.Re=" << C0.m_nRe << endl; cout << "C0.Im=" << C0.m_nIm << endl; cout << "C1.Re=" << C1.m_nRe << endl; cout << "C1.Im=" << C1.m_nIm << endl; cout << "C2.Re=" << C2.m_nRe << endl; cout << "C2.Im=" << C2.m_nIm << endl; }
ネタ元