Skip to content

Commit ad6d1e4

Browse files
committed
another float list
1 parent 3d5af5f commit ad6d1e4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

List.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ int main(){
4242
list<float> list2(3); // Empty list of size 3
4343
list<float>::iterator itr;
4444
itr = list2.begin()
45-
list2.push_back(7);
46-
list2.push_back(5);
47-
list2.push_back(75);
45+
*itr = 7;
46+
itr++;
47+
*itr = 5;
48+
itr++;
49+
*itr = 75;
50+
itr++;
4851
display(list2);
4952

5053
return 0;

0 commit comments

Comments
 (0)