Thread: Why did not my post accept?

  1. #1
    Banned
    Join Date
    Mar 2017
    Posts
    8

    Exclamation Why did not my post accept?

    I just wanted people to explain to me what the code I'll give is.Why did they not even inform me that my post was rejected?

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    What are you talking about? Was your post rejected? It seems to me that this is your first message here.
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    A post can be "rejected" (in a sense) because of a lack of code tags.

    Also, apparently some posts are being "moderated", which means they should show up later.

  4. #4
    Guest
    Guest
    Maybe it was just a temporary error in the forum Hawksed? If you want to give it another try, consider copying your message into a text editor in case it fails to post again.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    It was an unrepairable train-wreck of formatting.

    I suggest you study what other posts look like when it comes to formatting code, and make sure yours looks the same through the preview feature before pressing submit.

    Also, you might want to work on your opening gambit of "I know nothing, please explain this code I found".
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Banned
    Join Date
    Mar 2017
    Posts
    8
    okay

  7. #7
    Banned
    Join Date
    Mar 2017
    Posts
    8
    Quote Originally Posted by GReaper View Post
    What are you talking about? Was your post rejected? It seems to me that this is your first message here.
    Here the messages on the C language board are moderated.

  8. #8
    Banned
    Join Date
    Mar 2017
    Posts
    8
    Quote Originally Posted by Salem View Post
    It was an unrepairable train-wreck of formatting.

    I suggest you study what other posts look like when it comes to formatting code, and make sure yours looks the same through the preview feature before pressing submit.

    Also, you might want to work on your opening gambit of "I know nothing, please explain this code I found".
    It looked the same as others, I inserted the code into special tags.

  9. #9
    Banned
    Join Date
    Mar 2017
    Posts
    8
    Quote Originally Posted by Guest View Post
    Maybe it was just a temporary error in the forum Hawksed? If you want to give it another try, consider copying your message into a text editor in case it fails to post again.
    No, I saw with my own eyes the inscription "the message was spent on moderation", and now I wait already for three days and it does not appear.
    Last edited by Hawksed; 03-29-2017 at 10:03 AM. Reason: edit

  10. #10
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Quote Originally Posted by Hawksed View Post
    It looked the same as others, I inserted the code into special tags.
    Oh really, so why was it full of TR/TD tags as well?
    Help me understand what the code does


    All you did was ctrl-a ctrl-c and ctrl-v and you call that effort?

    You may as well have just included the URL to where you copied it from - that would have been more useful.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  11. #11
    Banned
    Join Date
    Mar 2017
    Posts
    8
    Quote Originally Posted by Salem View Post
    Oh really, so why was it full of TR/TD tags as well?
    Help me understand what the code does


    All you did was ctrl-a ctrl-c and ctrl-v and you call that effort?

    You may as well have just included the URL to where you copied it from - that would have been more useful.
    It's just that your site does not want to highlight the syntax, so unnecessary efforts are useless. I put the code on pastebin:
    [C] vdc.c - Pastebin.com
    Such efforts are worth it.

  12. #12
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Hawksed
    It's just that your site does not want to highlight the syntax
    Except that it does. Here's a sample of one of the functions from your pastebin code:
    Code:
    static int do_cmd(int sock, int argc, char **argv) {
        char final_cmd[255] = "0 "; /* 0 is a (now required) sequence number */
        int i;
        size_t ret;
        for (i = 1; i < argc; i++) {
            char *cmp;
            if (!index(argv[i], ' '))
                asprintf(&cmp, "%s%s", argv[i], (i == (argc -1)) ? "" : " ");
            else
                asprintf(&cmp, "\"%s\"%s", argv[i], (i == (argc -1)) ? "" : " ");
            ret = strlcat(final_cmd, cmp, sizeof(final_cmd));
            if (ret >= sizeof(final_cmd))
                abort();
            free(cmp);
        }
        if (write(sock, final_cmd, strlen(final_cmd) + 1) < 0) {
            perror("write");
            return errno;
        }
        return do_monitor(sock, 1);
    }
    Basically, post it in the same unadorned text as in your editing environment, within [code][/code] tags. You may find that the syntax highlighting does not appear to be applied immediately after you post, but it will be on the next page load. You may encounter a bug where leading whitespace right after the opening code tag is not kept, but that's a fairly rare problem and can be worked around or just ignored.
    Last edited by laserlight; 03-31-2017 at 02:05 AM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  13. #13
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    You might want to paste code from your editor to notepad first to remove any nonsense formatting, and then paste here from notepad, again, using code tags. Some environments are particularly bad about adding colors or weird fonts; all of which will cause the syntax highlighting to be turned off.

    Code:
    Maybe it's not this bad, but everyone can see what happens in this case.

  14. #14
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    If you're on Chrome, you can paste as plain text via ctrl-shift-v. Edge just strips all formatting anyway.

  15. #15
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    587
    Quote Originally Posted by whiteflags View Post

    Code:
    Maybe it's not this bad, but everyone can see what happens in this case.
    quzah is that you?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. accept() and WSAEFAULT
    By karas in forum Windows Programming
    Replies: 2
    Last Post: 01-09-2012, 03:01 PM
  2. accept()
    By ~Kyo~ in forum Networking/Device Communication
    Replies: 11
    Last Post: 11-28-2009, 08:57 PM
  3. How can i accept any connection
    By lolguy in forum Networking/Device Communication
    Replies: 2
    Last Post: 04-06-2009, 02:51 PM
  4. accept()
    By char in forum C Programming
    Replies: 0
    Last Post: 05-30-2002, 02:22 PM

Tags for this Thread