Thread: char array pointers problem

  1. #31
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by MacGyver View Post
    It's especially problematic when people do not bother to name their variables correctly. I understand the pointer in question was named 'c' just as an example, but in practice that would be a horrible name when trying to determine the type.
    It depends on your IDE... For me - it's just a mouse click... When I click on var or function - I see its declaration... So it's upto you to make your work comfortable without srewing up your code...
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  2. #32
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by MacGyver View Post
    quzah on the other hand was disappointing. I know he has a tremendous amount of experience on these forums, but the post that he made was not reflective of the knowledge and experience of someone of his calibre. His argument boiled down to writing his code for the sake of himself and himself only. That's somewhat sad because I could argue that for the same reason to cast. If I'm only going to write code that I care about, then I can do anything I want with it, and if I prefer to make the memory allocations clearer by casting, then according to him, that is not only my right by almost my duty. His main points, however, was that the cast was pointless and a waste of keystrokes. Perhaps that was the point of his long and ironic post that exhibited an unusal amount of keystrokes from him, but it seemed like he failed to think the post through before he got irritated with me. I have no idea why he would do that, and as I said, it was sorely disappointing.
    This is your failing yet again. You seem to think that you're the only one smart enough here to know what irony is. You also seem to think I actually care if I "disappoint" you. Clearly you know nothing of me.

    This is your argument was foolish at best, and boiled down to: "I should cast because some time there's a minute chance that some one might possibly hopefully decide to port it to C++, and IF they decide to, I'll help them by typecasting everything!"

    To which I apparently disappointed you because you didn't fail to understand that by catering to one minute fragment of the population, you automatically cut out all of the rest. By tailoring your code for the hopes that some day it MIGHT be ported to C++, you automatically exclude the rest of the people that MIGHT want to change for an int to a float.

    Yet somehow, you claim to have a grasp of irony.


    Quzah.
    Last edited by quzah; 03-31-2007 at 10:52 PM.
    Hope is the first step on the road to disappointment.

  3. #33
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Quote Originally Posted by quzah View Post
    Clearly you know nothing of me.
    If your behavior in this thread is any indication of you, then I'm not so sure I wish to learn any more.

    I have showed respect for experience on these forums, respect that I do not believe you deserve if you foam at the mouth when someone disagrees with your reasoning. I registered here to assist people that I am able to assist, and I do not see how this is beneficial.

  4. #34
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    I'm thinking this thread has about run it's course.
    Time to let it rest for a while.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Char array problem.
    By kbro3 in forum C++ Programming
    Replies: 16
    Last Post: 08-21-2008, 01:31 PM
  2. Entering data into array of char pointers
    By richdb in forum C Programming
    Replies: 13
    Last Post: 04-09-2006, 07:30 AM
  3. Problem Putting INTs Into a CHAR Array
    By cram in forum C++ Programming
    Replies: 13
    Last Post: 10-13-2004, 07:53 AM
  4. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 06:58 PM
  5. Creating 2D arrays on heap
    By sundeeptuteja in forum C++ Programming
    Replies: 6
    Last Post: 08-16-2002, 11:44 AM