Login
You're viewing the adforward.org public feed.
  • Sep 22, 2026, 4:06 AM

    #TIL that C++ allows defining new vars inside if condition, as in

    if (int x = f())
    if (char buf[10]; std::fgets(buf, 10, stdin))

    This is extremely cursed, but I kinda wish it was there in C, like it happened with for loop initialization.

    💬 1🔄 0⭐ 0

Replies