Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
4a0df05c
Commit
4a0df05c
authored
May 27, 2018
by
scoder
Committed by
GitHub
May 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2297 from gabrieldemarmiesse/showing_range_for_vector
Added an example of iteration for x in vector.
parents
c486516b
ec84f6db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
docs/src/userguide/wrapping_CPlusPlus.rst
docs/src/userguide/wrapping_CPlusPlus.rst
+3
-1
No files found.
docs/src/userguide/wrapping_CPlusPlus.rst
View file @
4a0df05c
...
@@ -463,11 +463,13 @@ For example::
...
@@ -463,11 +463,13 @@ For example::
from libcpp.vector cimport vector
from libcpp.vector cimport vector
cdef vector[int] vect
cdef vector[int] vect
cdef int i
cdef int i
, x
for i in range(10):
for i in range(10):
vect.push_back(i)
vect.push_back(i)
for i in range(10):
for i in range(10):
print(vect[i])
print(vect[i])
for x in vect:
print(x)
The pxd files in ``/Cython/Includes/libcpp`` also work as good examples on
The pxd files in ``/Cython/Includes/libcpp`` also work as good examples on
how to declare C++ classes.
how to declare C++ classes.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment