0

Cout the number of occurence of a particular element x in c++ vector??

What is the problem in this code ?? https://code.sololearn.com/cbxa4Z841o22/?ref=app

26th Jul 2023, 4:00 PM
Anuj Khare
Anuj Khare - avatar
2 Antworten
+ 2
Nothing is wrong with the code, I've provided default value for the vector and it works fine https://code.sololearn.com/c4Mmj46I2li0/?ref=app
26th Jul 2023, 5:53 PM
RuntimeTerror
RuntimeTerror - avatar
+ 1
Anuj Khare The code has no problems. Maybe you are referring to warning caused by comparision (in the first loop) between an int (the i var) and unaigned long inte (returned type from size() of vector)
26th Jul 2023, 7:00 PM
KrOW
KrOW - avatar