Created
December 8, 2016 15:12
-
-
Save reeFridge/2f859b96a6194dee477bcd2e22edc59d to your computer and use it in GitHub Desktop.
C++ Constructors
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
int main() { | |
const classes::m_size size; | |
std::cout << "Create m" << std::endl; | |
classes::RectMatrix m; | |
std::cout << "End" << std::endl << std::endl; | |
std::cout << "Create m1" << std::endl; | |
classes::RectMatrix m1(); // is a function declaration | |
std::cout << "End" << std::endl << std::endl; | |
std::cout << "Create m2" << std::endl; | |
classes::RectMatrix m2(void); // is a function declaration | |
std::cout << "End" << std::endl << std::endl; | |
std::cout << "Create m3" << std::endl; | |
classes::RectMatrix m3(size); | |
std::cout << "End" << std::endl << std::endl; | |
std::cout << "Create m4" << std::endl; | |
classes::RectMatrix m4(m); | |
std::cout << "End" << std::endl << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment