Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What will this output?

Name: Anonymous 2016-06-19 12:21

What will this program output?
Good luck, you'll need it!

#include <iostream>
using namespace std;

int main() {
class c {
public:
c() {
void f();
f();
}
};

c my_c();
}

void f() {
cout << "VALID C++" << endl;
}


The answer is absolutely nothing because c my_c(); is a fucking function declaration.

Name: Anonymous 2016-07-11 22:59

>>45
Turing complete means able to simulate any single-taped Turing machine. And I was memeing, C++ actually IS Turing complete because the language itself places no limit on the available memory. But the language specification is just a theoretical ideal, any actual implementation of the language will not be truly Turing complete because the hardware limits available memory. You can write code in C++ to simulate a universal Turing machine, but there will always be some Turing machine that is impossible to simulate because there isn't enough memory. Some Turing machines actually do require infinite memory (though these are by definition non-halting, but not all non-halting TM's require infinite memory), and since the largest positive number less than infinity is unbounded, for any physical computer there will exist some halting Turing machine which it does not have sufficient memory to simulate.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List