View Poll Results: Is he an idiot?

Voters
11. You may not vote on this poll
  • YES!

    7 63.64%
  • Of course not!!

    4 36.36%

Thread: What should I think...

  1. #16
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Prelude, show us what that code should be changed too
    It seems I answer a question of this nature every day. The correct way to do this is to allocate enough memory to hold what you intend to copy to p.
    Code:
    char *p = malloc ( sizeof ( "Hello, world!" ) );
      
    if ( p != NULL )
      strcpy ( p, "Hello, world!" );
    -Prelude
    My best code is written with the delete key.

  2. #17
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Ah, I see. Thanks Prelude.

  3. #18
    Registered User zahid's Avatar
    Join Date
    Aug 2001
    Posts
    531
    Most probably,
    He was joking or making u anoid.
    else
    He don't know what *nix are? How ther are serving him even his daily life.
    [ Never code before desk work ]
    -------------------------------------:-->
    A man who fears Nothing is the man who Loves Nothing
    If you Love Nothing, what joy is there in your life.
    =------------------------------------------------------= - I may be wrong.

  4. #19
    Registered User Jet_Master's Avatar
    Join Date
    May 2002
    Posts
    291
    i would NOT say that he's an idiot (until i read the last part)

    just for that, he is an idiot; but he is a highly capable idiot - my opinion...
    I am the Alpha and the Omega!!!

  5. #20
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    What should you think?

    Try various OSs yourself including the one's he promotes and after a while, form your own opinion.....

    Just becaue someone seems an "expert" at something or another doesnt make them a fountain of knowlege IMO....

  6. #21
    Registered User jawwadalam's Avatar
    Join Date
    May 2002
    Posts
    131

    Hacking Is Always... Ethical.....Cracking is Unethical...!

    What do i have understand form the site of Happy Hackers
    http://happyhacker.org/define.shtml is that Hacking is always ethical... while Cracking is Unethical and Illegal...
    Because Hackers do not suppose to crack the Network... for malacious Purposes..
    One day you will ask what more important to you..
    I will say my life..
    and You will leave me with even knowing
    that
    You are my Life (L)

  7. #22
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    how about this?

    Code:
    #define STR_SIZE 14
    
    char* p = (char*) malloc(STR_SIZE);
    
    if(p != NULL)
        p = strncpy(p, "Hello, World!", STR_SIZE);
    as far as i see it as the same limitations? maybe looks a little cleaner?
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

Popular pages Recent additions subscribe to a feed