RE: Which programming language
March 11, 2010 at 12:08 pm
(This post was last modified: March 11, 2010 at 1:14 pm by Rob.)
(February 27, 2010 at 2:54 pm)Tiberius Wrote: Java isn't just about cross platform engineering, please don't think that. It's a powerful language in its own right, and an increasingly popular one because of its error handling and general ease of use.
C++ is unusable in comparison IMO.
I OBJECT! C++ is an excellent language if you are of such competence as to not need the security blanket of java.
what could be confusing about this? :
Code:
#include <iostream>
class Tmp {
public:
Tmp(void) {
memcpy(this->_buf, "Hello Atheist Forums", 5);
}
char _buf[20];
};
int main(void) {
const unsigned int buf_size = 21;
char buf[buf_size];
memset(buf, 0x00, buf_size);
memcpy(buf, "Water world.", 13);
new (buf) Tmp;
std::cout << buf << '\n';
return 0;
}
Points to whoever can tell me what what this will output without using a compiler.
Hoi Zaeme.