612
submitted 1 month ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 21 points 1 month ago

MSVC supports unicode. In C or C++, you could try:

#define ; ;

Second one is the greek semicolon but the client I'm using may strip it out. I'm too lazy to try.

[-] [email protected] 3 points 1 month ago

Running #define ; anything yields error: macro names must be identifiers for both C and C++ in an online compiler. So I don't think the compiler will let you redefine the semicolon.

[-] [email protected] 3 points 1 month ago

Haha. Thanks for checking. Given the C pre-processor, I'm sure there's a way to maliciously bork it if someone sets their mind to it.

[-] [email protected] 2 points 1 month ago* (last edited 1 month ago)

Well I just tried #define int void in C and C++ before a "hello world" program. C++ catches it because main() has to be an int, but C doesn't care. I think it is because C just treats main() as an int by default; older books on C don't even include the "int" part of "int main()" because it's not strictly necessary.

#define int void replaces all ints with type void, which is typically used to write functions with no return value.

[-] [email protected] 1 points 1 month ago

I'm not sure but I think the second one looks just a tiny bit different, so it should have worked.

this post was submitted on 12 May 2024
612 points (94.0% liked)

Memes

44066 readers
1645 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS