Skip to content

Commit c77a069

Browse files
committedMay 9, 2023
fix unsigned
1 parent f5a7b32 commit c77a069

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎random_walk.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ int main()
6161
int went_back_to_start_count = 0;
6262
int failure_count = 0;
6363
int max_steps_before_going_back = 0;
64-
vector<int> steps_it_went_to_zero;
64+
vector<unsigned int> steps_it_went_to_zero;
6565
for(int i=0; i < NUMBER_OF_RDM_WALKS; ++i){
6666

6767
int percent = (100 * i) / NUMBER_OF_RDM_WALKS;

‎random_walk_vector.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ int main()
8181

8282
//fill the vector with the dimension size and number of try
8383
vector<Points> global_vector;
84+
85+
8486
for(int i=0; i < NUMBER_OF_RDM_WALKS; ++i){
8587
global_vector.push_back(Points(DIMENSION));
8688
}
@@ -92,7 +94,7 @@ int main()
9294
//counters
9395
int went_back_to_start_count = 0;
9496
int failure_count = 0;
95-
int max_steps_before_going_back = 0;
97+
unsigned int max_steps_before_going_back = 0;
9698
for(unsigned int walk_number=0; walk_number < MAX_TRY_BEFORE_GIVEUP; ++walk_number){
9799

98100
//just some progress bar

0 commit comments

Comments
 (0)
Please sign in to comment.