4 ms·
> What does the C++ code print? And there it is. I programmed in C++ long enough to "know" this, but I still remember more jr. Engineers and even arguments wit
by bluejekyll 11y ago
> What does the C++ code print?
And there it is. I programmed in C++ long enough to "know" this, but I still remember more jr. Engineers and even arguments with more sr. Engineers around this type of question.
Rust has removed this kind of question almost entirely from the language.
Personally, I have no intention of ever going back to C/C++ for any new project I work on.
- alimw 11y ago> What does the C++ code print? If you guessed wrong, don't worry. You're in good company. If you guessed right, congrats! How do I knowwww????
- nothrabannosir 11y ago$ g++ test.cpp $ ./a.out EDIT---answer removed to let others guess first.
- eximius 11y agoAw. As a user on my phone you make me sad.
- nothrabannosir 11y agoSorry about that. http://pastebin.com/T8fBtUnk http://pastebin.com/T8fBtUnk
- alimw 11y agoOr Windows. Anyway my point was, why force your readers to find and use a compiler when you could just give the answer below? Not sure why I got downvoted.
- mpweiher 11y agoOf course, this has nothing to do with OO, and everything with C++. "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind" -- Alan Kay