Re: Unsigned types are DANGEROUS??

Discussion in 'C++' started by Paul, Mar 16, 2011.

  1. Paul

    Paul Guest

    "SG" <> wrote in message
    news:...
    > On 16 Mrz., 05:30, Paul wrote:
    >> SG wrote:
    >> > On 15 Mrz., 19:35, "Paul" wrote:

    >>
    >> >> I don't see what your confusion is. If the standard states:
    >> >> "A name is a use of an identifier (2.10) that denotes an entity"
    >> >> then with:

    >>
    >> >> type* p_name = new type[16];

    >>
    >> >> p_name is the name of the entity, that is the array.
    >> >> The above expression creates an array, you seem confused about
    >> >> this, similarly to Leigh and Noah.
    >> >> Do you think this is not array?

    >>
    >> > What exacly? p_name? p_name denotes a pointer variable. You
    >> > initialized this pointer to store the address of the first element of
    >> > a dynamically allocated array.

    >>
    >> >> The fact that the identifier is a pointer goes without saying,

    >>
    >> > Does it? I honestly can't tell what things go without saying and what
    >> > not when it comes to "discussing" something with you. btw: To be very
    >> > precise: The identifier *denotes* a pointer variable. An identifier is
    >> > a sequence of characters in your source code file.

    >>
    >> >> as does the
    >> >> fact that its name is p_name. The entity is an array structure,

    >>
    >> > The entity whose name is p_name is a pointer variable. Period.

    >>
    >> No Period.
    >> If I use the name in an expression like so:
    >> p_name[AnIndex];

    >
    > That does not prove anything.
    >
    >> p_name is the name of an array entity.

    >
    > It's not -- using any reasonable interpretation of the C++ ISO
    > standard.


    Yes it is, and I don't care what the standards redefines name/identifier to
    mean. It means exactly what It means as defined in the english dictionary.


    >
    >> >> [...] why I don't understand.

    >>
    >> > Might I ask what book(s) you used to learn C and/or C++?

    >>
    >> Turbo C++ version 3.0 or something. It came in a big brown box with 2 big
    >> manuals and ran on win95.
    >> [...]
    >> What books did you learn C++ from?

    >
    > The good kind.
    >
    > "The C++ Programming Language" (Special Edition) by Bjarne Stroustrup
    > "Effective C++" (3rd edition) by Scott Meyers
    > "C++ Templates: The Complete Guide" by Vandevoorde and Josuttis
    > "The Design and Evolution of C++" by Bjarne Stroustrup
    >
    > and the occasional look into the standard drafts that are publicly
    > available for free, starting with a very early C++0x draft n1804.pdf
    > which contains almost no C++0x feature (except long long, for
    > example).
    >
    > I have other C++ related books in my shelf. But I wouldn't say that I
    > learned much C++ from them.
    >

    Seems like you have a very confused learning curve, perhaps this is why you
    are still confused now.

    GL
    Paul, Mar 16, 2011
    #1
    1. Advertising

  2. Paul

    SG Guest

    Paul wrote:
    > [...]
    > I don't care what the standards redefines name/identifier to mean.
    > [...]
    > Seems like you have a very confused learning curve,
    > perhaps this is why you are still confused now.


    If you cared, you wouldn't think that everybody but you is "confused".
    Also, I wouldn't use the word "redefine" here. "disambiguate" would be
    a more fitting word, IMHO. To talk about abstract things one has to
    agree on rather precise definitions.

    SG
    SG, Mar 16, 2011
    #2
    1. Advertising

  3. Paul

    Paul Guest

    "SG" <> wrote in message
    news:...
    > Paul wrote:
    >> [...]
    >> I don't care what the standards redefines name/identifier to mean.
    >> [...]
    >> Seems like you have a very confused learning curve,
    >> perhaps this is why you are still confused now.

    >
    > If you cared, you wouldn't think that everybody but you is "confused".
    > Also, I wouldn't use the word "redefine" here. "disambiguate" would be
    > a more fitting word, IMHO. To talk about abstract things one has to
    > agree on rather precise definitions.
    >

    Thats just the problem you can't agree that a dynamic array exists.

    int* arr = new int[16];
    arr[0] = 5;

    It's an an array. It's not *just* a pointer.

    I have nothing more to say on this subject unless you can accept this fact.
    Paul, Mar 16, 2011
    #3
  4. Paul

    SG Guest

    On 16 Mrz., 17:42, Paul wrote:
    > SG wrote:
    > >> [...]
    > >> I don't care what the standards redefines name/identifier to mean.
    > >> [...]
    > >> Seems like you have a very confused learning curve,
    > >> perhaps this is why you are still confused now.

    >
    > > If you cared, you wouldn't think that everybody but you is "confused".
    > > Also, I wouldn't use the word "redefine" here. "disambiguate" would be
    > > a more fitting word, IMHO. To talk about abstract things one has to
    > > agree on rather precise definitions.

    >
    > Thats just the problem you can't agree that a dynamic array exists.


    I did not say that it does not exist. I said that it does not have a
    name.

    > int* arr = new int[16];
    > arr[0] = 5;
    >
    > It's an an array. It's not *just* a pointer.


    arr is not an array. arr is a pointer. Being a pointer and being an
    array are mutually exclusive. If you intent to use C++ prefessionally
    (I'd hazard the guess that this is currently not the case) you better
    "unlearn your C++" and get hold of a decent C++ book. You are
    currently unfit to communicate about C++ related matters. Don't take
    this personally. You're welcome.

    SG
    SG, Mar 16, 2011
    #4
  5. Paul

    Paul Guest

    "SG" <> wrote in message
    news:...
    > On 16 Mrz., 17:42, Paul wrote:
    >> SG wrote:
    >> >> [...]
    >> >> I don't care what the standards redefines name/identifier to mean.
    >> >> [...]
    >> >> Seems like you have a very confused learning curve,
    >> >> perhaps this is why you are still confused now.

    >>
    >> > If you cared, you wouldn't think that everybody but you is "confused".
    >> > Also, I wouldn't use the word "redefine" here. "disambiguate" would be
    >> > a more fitting word, IMHO. To talk about abstract things one has to
    >> > agree on rather precise definitions.

    >>
    >> Thats just the problem you can't agree that a dynamic array exists.

    >
    > I did not say that it does not exist. I said that it does not have a
    > name.
    >
    >> int* arr = new int[16];
    >> arr[0] = 5;
    >>
    >> It's an an array. It's not *just* a pointer.

    >
    > arr is not an array. arr is a pointer. Being a pointer and being an
    > array are mutually exclusive. If you intent to use C++ prefessionally
    > (I'd hazard the guess that this is currently not the case) you better
    > "unlearn your C++" and get hold of a decent C++ book. You are
    > currently unfit to communicate about C++ related matters. Don't take
    > this personally. You're welcome.
    >

    And you're just a dumb ass idiot who doesn't understand the language , don't
    take it personally :)
    Paul, Mar 17, 2011
    #5
  6. Paul

    SG Guest

    Paul, I'm sure that many others think of you as an idiot as well. But
    expressing these kinds of opinions is not going to have any positive
    effects whatsoever. It's quite the opposite. So, you might as well
    just save your time.

    Anyhow, let me point one issue:

    On 17 Mrz., 15:10, Paul wrote:
    > >> int* E1 = new int[16];
    > >> ++E1;
    > >> E1[-1] = 6;

    > [...]
    > I am not even reading your long winded explnation of what E1 is
    > above. I'm simply "telling" you it's an array, I don't care what
    > you think I'm telling you wehat it simply is.
    > [...]
    > I don't care what the standards redefines name/identifier to mean.
    > [...]
    > You are obvioulsy an extremely thick person,
    > just like the other idiots who think this idiotic way.
    > I don't mean to be rude or nasty but that is simply how it is,
    > I find you to be a dumb idiot.
    > GL with C++, you're going to need it.
    > [...]
    > THe only misinformed opinion around here is the IDIOTS that think an
    > array is not an array because its a pointer.


    Nobody thinks that. You misunderstood and misrepresented that.

    > I don't mean to be rude or nasty but I'm sorry I have no other opinion
    > on these people, they are just dumb ass idiots and nothing more.
    > [...]
    > And you're just a dumb ass idiot who doesn't understand the language,
    > [...]


    SG
    SG, Mar 17, 2011
    #6
  7. Paul

    Paul Guest

    "SG" <> wrote in message
    news:...
    > Paul, I'm sure that many others think of you as an idiot as well. But
    > expressing these kinds of opinions is not going to have any positive
    > effects whatsoever. It's quite the opposite. So, you might as well
    > just save your time.
    >
    > Anyhow, let me point one issue:
    >
    > On 17 Mrz., 15:10, Paul wrote:
    >> >> int* E1 = new int[16];
    >> >> ++E1;
    >> >> E1[-1] = 6;

    >> [...]
    >> I am not even reading your long winded explnation of what E1 is
    >> above. I'm simply "telling" you it's an array, I don't care what
    >> you think I'm telling you wehat it simply is.
    >> [...]
    >> I don't care what the standards redefines name/identifier to mean.
    >> [...]
    >> You are obvioulsy an extremely thick person,
    >> just like the other idiots who think this idiotic way.
    >> I don't mean to be rude or nasty but that is simply how it is,
    >> I find you to be a dumb idiot.
    >> GL with C++, you're going to need it.
    >> [...]
    >> THe only misinformed opinion around here is the IDIOTS that think an
    >> array is not an array because its a pointer.

    >
    > Nobody thinks that. You misunderstood and misrepresented that.
    >

    Thats exactly what you've been saying.
    Paul, Mar 17, 2011
    #7
  8. Paul

    Paul Guest

    "SG" <> wrote in message
    news:...
    > Paul, I'm sure that many others think of you as an idiot as well. But
    > expressing these kinds of opinions is not going to have any positive
    > effects whatsoever. It's quite the opposite. So, you might as well
    > just save your time.
    >
    > Anyhow, let me point one issue:
    >
    > On 17 Mrz., 15:10, Paul wrote:
    >> >> int* E1 = new int[16];
    >> >> ++E1;
    >> >> E1[-1] = 6;

    >> [...]
    >> I am not even reading your long winded explnation of what E1 is
    >> above. I'm simply "telling" you it's an array, I don't care what
    >> you think I'm telling you wehat it simply is.
    >> [...]
    >> I don't care what the standards redefines name/identifier to mean.
    >> [...]
    >> You are obvioulsy an extremely thick person,
    >> just like the other idiots who think this idiotic way.
    >> I don't mean to be rude or nasty but that is simply how it is,
    >> I find you to be a dumb idiot.
    >> GL with C++, you're going to need it.
    >> [...]
    >> THe only misinformed opinion around here is the IDIOTS that think an
    >> array is not an array because its a pointer.

    >
    > Nobody thinks that. You misunderstood and misrepresented that.
    >

    That's exactly what you(lot) think. I have misunderstood nothing, nor have I
    misrepresented anything.
    You don't have the intelligence to understand that E1 represents an array.
    It's very basic stuff and if you can't even understand the basics perhaps
    you should go back to your books and relearn C++.

    Start by trying to understand that a dynamic array is in fact an array. You
    obviously think that because the identifier is a pointer-type it's not an
    array, which is of course completely incorrect.
    Paul, Mar 17, 2011
    #8
  9. Paul

    Noah Roberts Guest

    On 3/17/2011 11:30 AM, Leigh Johnston wrote:
    > On 17/03/2011 18:28, Paul wrote:


    >> Start by trying to understand that a dynamic array is in fact an array.
    >> You obviously think that because the identifier is a pointer-type it's
    >> not an array, which is of course completely incorrect.
    >>

    >
    > An array is not a pointer and a pointer is not an array; pretty simple
    > to grasp IMO; I wonder why you are having difficulties?


    Guys...

    "I am an amateur programmer who hasnt even looked at any programming for
    over 5 years."
    "This enforces my choice to stop learning any further C++ *shrug*" -
    2/19/11 4:23

    "I just batter the keypad and deny anything you say now because I
    dislike you sso much." - 3/16/11 7:16

    This Paul guy neither knows C++, nor cares to know C++, nor cares what
    he is saying. This by his very own words. His participation here is
    obviously for no other purpose than to see his own name and to garner as
    many replies as possible. Attempting to argue with someone that is
    fully aware of not knowing what they're talking about, doesn't care, and
    is arguing for its own sake is never going to get you anywhere.

    The fact that this poster (apparently) regularly argues completely
    ass-backward points should not be surprising to anyone. It has nothing
    to do with C++ and everything to do with Paul. I'm sure he'd argue that
    up is down if given half the opportunity and attention.

    --
    http://crazycpp.wordpress.com
    Noah Roberts, Mar 17, 2011
    #9
  10. Paul

    Paul Guest

    "Leigh Johnston" <> wrote in message
    news:...
    > On 17/03/2011 18:28, Paul wrote:
    >>
    >> "SG" <> wrote in message
    >> news:...
    >>> Paul, I'm sure that many others think of you as an idiot as well. But
    >>> expressing these kinds of opinions is not going to have any positive
    >>> effects whatsoever. It's quite the opposite. So, you might as well
    >>> just save your time.
    >>>
    >>> Anyhow, let me point one issue:
    >>>
    >>> On 17 Mrz., 15:10, Paul wrote:
    >>>> >> int* E1 = new int[16];
    >>>> >> ++E1;
    >>>> >> E1[-1] = 6;
    >>>> [...]
    >>>> I am not even reading your long winded explnation of what E1 is
    >>>> above. I'm simply "telling" you it's an array, I don't care what
    >>>> you think I'm telling you wehat it simply is.
    >>>> [...]
    >>>> I don't care what the standards redefines name/identifier to mean.
    >>>> [...]
    >>>> You are obvioulsy an extremely thick person,
    >>>> just like the other idiots who think this idiotic way.
    >>>> I don't mean to be rude or nasty but that is simply how it is,
    >>>> I find you to be a dumb idiot.
    >>>> GL with C++, you're going to need it.
    >>>> [...]
    >>>> THe only misinformed opinion around here is the IDIOTS that think an
    >>>> array is not an array because its a pointer.
    >>>
    >>> Nobody thinks that. You misunderstood and misrepresented that.
    >>>

    >> That's exactly what you(lot) think. I have misunderstood nothing, nor
    >> have I misrepresented anything.
    >> You don't have the intelligence to understand that E1 represents an
    >> array. It's very basic stuff and if you can't even understand the basics
    >> perhaps you should go back to your books and relearn C++.
    >>
    >> Start by trying to understand that a dynamic array is in fact an array.
    >> You obviously think that because the identifier is a pointer-type it's
    >> not an array, which is of course completely incorrect.
    >>

    >
    > An array is not a pointer and a pointer is not an array; pretty simple to
    > grasp IMO; I wonder why you are having difficulties?
    >

    That is the view of a very narrow minded simpleton. He obviously doesn't
    have a very good understanding of the language.
    The C++ standards clearly state:
    "the subscript operator [] is interpreted in such a way
    that E1[E2] is identical to *((E1)+(E2))."

    If he had any understanding of the language he would understand that all
    arrays are converted to pointers. The only difference with dynamic arrays is
    that no implict conversion is required because the arrays identifier is
    already a pointer.
    Paul, Mar 17, 2011
    #10
  11. Paul

    Paul Guest

    "Noah Roberts" <> wrote in message
    news:4d82567b$0$2420$...
    > On 3/17/2011 11:30 AM, Leigh Johnston wrote:
    >> On 17/03/2011 18:28, Paul wrote:

    >
    >>> Start by trying to understand that a dynamic array is in fact an array.
    >>> You obviously think that because the identifier is a pointer-type it's
    >>> not an array, which is of course completely incorrect.
    >>>

    >>
    >> An array is not a pointer and a pointer is not an array; pretty simple
    >> to grasp IMO; I wonder why you are having difficulties?

    >

    <snip>
    <quote Noah>
    Equally important to note here is that the pointer in question in these
    cases is NOT a pointer to an array. These are pointers to 'type'. They
    point to an object of type 'type'. That object happens to be a part of
    an array.

    A pointer to an array would have a type something like so:

    int (*)[10]
    </quote>

    This is the sort of idiotic nonsense that comes from not understanding the
    C++ language..

    int (*array)[4] = new int[4][4];

    What is array? a pointer, an array, a pointer to an array type?

    It's an array, you dumbass.
    Paul, Mar 17, 2011
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. b83503104
    Replies:
    1
    Views:
    3,499
    Eric Sosman
    Jun 21, 2004
  2. MikeP
    Replies:
    215
    Views:
    3,338
    werasm
    Mar 30, 2011
  3. MikeP
    Replies:
    1
    Views:
    249
    MikeP
    Mar 14, 2011
  4. pozz
    Replies:
    12
    Views:
    738
    Tim Rentsch
    Mar 20, 2011
  5. tim
    Replies:
    40
    Views:
    1,570
    Shao Miller
    Feb 1, 2012
Loading...

Share This Page