Sunday, April 23, 2017

Jack Tokenizer : Block Comments - Tougher Than You Thought

// my first program in C++
/* checking if this 
// */
// terminates a comment
// answer : yes, it does - so block comments are more powerful :)
// if I had something above after the */, it would mess things up

#include

int main()
{
  std::cout << "Hello World!";
}


Moral of the story - don't just throw away everything after the //

No comments:

Post a Comment