Solved

Sequence Point Violation?

Posted on 2007-03-29
2
159 Views
Last Modified: 2010-04-01
Suppose you have a string of bytes, each representing an integer value, and you iterate through them with a pointer.

You have:

unsigned char byte_string[100] = { some values in here }
unsigned char* p = byte_string;

Is it legal to increment p by one of the values in the byte_string like this:

p += *p;

Does that violate the sequence point rule?
0
Comment
Question by:chsalvia
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 25 total points
ID: 18820897
As I read the rule, I don't think it does.
0
 
LVL 11

Assisted Solution

by:DeepuAbrahamK
DeepuAbrahamK earned 25 total points
ID: 18821696
Good Read
http://en.wikipedia.org/wiki/Sequence_point
Best Regards,
DeepuAbrahamK
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now