Question: #include #include using namespace std; //Function to Sort The Vector. void SortVector(std::vector &v) { int vector; //Bubble sort Algorithm for the size of the Vector.

#include #include using namespace std; //Function to Sort The Vector. void SortVector(std::vector&v) { int vector; //Bubble sort Algorithm for the size of the Vector. for (int i = 0; i v[j+1]) { vector = v[j]; v[j] = v[j+1]; v[j+1] = vector; } } } } //The Main Function. int main() { int vec; int num; // Declare the Vector. vector v; cin >> vec; for (int i = 0; i > num; //Push Back Function. v.push_back(num); } //Sort() Function and pass the vector as argument to this function. SortVector(v); // Print the vector elements using for loop. for (int i = 0; i

} #include #include using namespace std; //Function to Sort The Vector. void SortVector(std::vector&v)

I am getting this warning and not sure what to do.

main.cpp: In function 'void SortVector (std::vector&)': main.cpp:8:23: warning: comparison of integer expressions of different signedness: 'int' and 8. for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!