Help with a class assignment

This is a discussion on Help with a class assignment within the C++ Programming forums, part of the General Programming Boards category; I don't have a choice. I have to use it....

  1. #16
    Registered User
    Join Date
    Mar 2011
    Posts
    21
    I don't have a choice. I have to use it.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,012
    Quote Originally Posted by iMalc View Post
    Elysia seems to be mandating that you follow what is merely an opinion here, which is disappointing.

    There is nothing wrong with having a typedef for a pointer type, especially when it's nicely named with a 'Ptr' at the end so it is perfectly clear. If you're aware of exactly how the typedef works and how to use the resulting type, then use it. Otherwise you shouldn't.

    Of course all of that is irrelevent if you have no choice but to use it.
    What is disappointing is that it's obfuscation, no matter how you look at it. The code is clearer--much clearer--if such typedefs are dropped, removed and burned. That part is not an opinion.
    That said, if it isn't possible to remove it until deadline, you should keep it. Grades before stupidity, so to speak.
    Anyway, it sucks, but good luck on your assignment.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    What's disappointing is that you don't have a clue what the difference is between fact and opinion. Someone's thoughts on a subject make up an opinion, by definition. You can also find people who drew different opinions from the same facts.

    Now since

    typedef foo *bar;

    is a pointer typedef, then it is obvious that this conclusion is an opinion on whether it is clear or not:

    Quote Originally Posted by Elysia View Post
    What is disappointing is that it's obfuscation, no matter how you look at it. The code is clearer--much clearer--if such typedefs are dropped, removed and burned. That part is not an opinion.
    This is also an opinion on the same thing:

    Quote Originally Posted by iMalc View Post
    There is nothing wrong with having a typedef for a pointer type, especially when it's nicely named with a 'Ptr' at the end so it is perfectly clear. If you're aware of exactly how the typedef works and how to use the resulting type, then use it. Otherwise you shouldn't.
    Now, I can prove that typedef foo *bar; is a pointer typedef, so that is a fact, but I can't test your opinions to be proven facts. It's not like the scientific method applies here. What measures clarity? Winning an argument doesn't make an opinion a fact either. Even after you're both done arguing, iMalc's opinion is still a possible conclusion based on the fact as is yours, Elysia.

    Maybe I'm just being a dick here, but I've noticed most of the arguments we have here are centered on people who assert their opinions as facts, and a little lesson in critical thinking never hurt anyone.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,012
    I'm dropping this discussion since I have no desire to discuss it, nor is this the time or place to discuss it. Let me just say that this is just my may of wording things.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    Well, now I'm worried you didn't get the point since that's the way you replied, but it would be nice if you worded things differently so we don't get caught up in arguments like this one that we're not having on the subject.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. class composition constructor question...
    By andrea72 in forum C++ Programming
    Replies: 3
    Last Post: 04-03-2008, 06:11 PM
  2. Replies: 3
    Last Post: 10-31-2005, 12:05 PM
  3. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM
  4. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 02:30 PM
  5. i need help with errors in my assignment for class
    By azrael13302473 in forum C++ Programming
    Replies: 1
    Last Post: 07-04-2002, 07:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21