halubilo.social
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to Programmer [email protected] • 4 months ago

unsafeCode

lemmy.ml

message-square
18
fedilink
  • cross-posted to:
  • [email protected]
348

unsafeCode

lemmy.ml

@[email protected] to Programmer [email protected] • 4 months ago
message-square
18
fedilink
  • cross-posted to:
  • [email protected]
  • @[email protected]
    link
    fedilink
    30•
    edit-2
    4 months ago

    Any void main(){...} enjoyers?

    • @[email protected]
      link
      fedilink
      8•
      edit-2
      1 month ago

      deleted by creator

      • Oriel Jutty :hhHHHAAAH:
        link
        fedilink
        9•4 months ago

        @stebo02 @Bogus5553 Neither of them require a return value, but void main isn’t legal C++.

        • @[email protected]
          link
          fedilink
          2•
          edit-2
          1 month ago

          deleted by creator

          • @[email protected]
            link
            fedilink
            4•
            edit-2
            4 months ago

            void main(){...} is not in the standard, but works on both MSVC and GCC (with warnings). I think it works on both C/C++, but you really shouldn’t use it in production. Just use int main(void){...} , without any return value, which is permitted in the standard, and will return success iirc.

      • @[email protected]
        link
        fedilink
        2•4 months ago

        It will also give an error if you try to add a return value anyways.

    • @[email protected]
      link
      fedilink
      4•4 months ago

      while (true) {...}

    • @[email protected]
      link
      fedilink
      1•4 months ago

      int main(void) { . . . } for me!

Programmer [email protected]

[email protected]

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 233 users / day
  • 1.58K users / week
  • 3.4K users / month
  • 9.79K users / 6 months
  • 36.5K subscribers
  • 1.77K Posts
  • 37.8K Comments
  • Modlog
  • mods:
  • @[email protected]
  • @[email protected]
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org