Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A different approach for compile time emoji replacement #43

Open
mdhvg opened this issue Oct 19, 2024 · 0 comments
Open

A different approach for compile time emoji replacement #43

mdhvg opened this issue Oct 19, 2024 · 0 comments

Comments

@mdhvg
Copy link

mdhvg commented Oct 19, 2024

We can write preprocessor macros to define emojis like in this example

#include <iostream>
#define _admission_tickets_ u8"\\U0001F39F"

int main() {
  const char *test = "Admission Tickets: " _admission_tickets_;
  std::cout << test << std::endl;
  return 0;
}

And on compilation, it expands to:

Admission Tickets: 🎟
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant