FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppcheck/samples/invalidContainer/good.cpp at 2.15.x · cppcheck-opensource/cppcheck · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cppcheck-opensource
/
cppcheck
Public
Notifications
You must be signed in to change notification settings
Fork
1.6k
Star
6.7k
Code
Pull requests
200
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
cppcheck
/
samples
/
invalidContainer
/
good.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (16 loc) · 342 Bytes
Breadcrumbs
cppcheck
/
samples
/
invalidContainer
/
good.cpp
Copy path
File metadata and controls
16 lines (16 loc) · 342 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
include
<
vector
>
int
main
()
{
std::vector<
int
> items;
items.
push_back
(
1
);
items.
push_back
(
2
);
items.
push_back
(
3
);
std::vector<
int
>::iterator iter;
for
(iter = items.
begin
(); iter != items.
end
();) {
if
(*iter ==
2
) {
iter = items.
erase
(iter);
}
else
{
++iter;
}
}
}
Back
|
FazBrowse Home
|
New Git URL