2 Reputation Points
Ranked #4K
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #107.41K
Re:
In the following code snippet, T represents a class. This code is claimed to have problem due to the fact that "p" will be out of range after running "*p=a". Why? [CODE] void f1(T a) { T v[200]; T* p = &v[0]; p--; *p=a; ++p; *p=a; } [/CODE] |