Home > Coding > Do Not Do

Do Not Do


a[n++] = b[++n];

Hint: If you know what it does, you’re wrong.

 

Categories: Coding Tags: , ,
  1. June 15, 2012 at 1:13 pm | #1

    UB

  2. June 15, 2012 at 1:56 pm | #2

    Correct :)

  3. capsain
    June 19, 2012 at 11:41 pm | #3

    Is it still undefined behavior if n is a class with overloaded ++ operators?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 183 other followers

%d bloggers like this: