Write std::find in <algorithm>
std::find(vector.begin(), vector.end(), item) != vector.end()
You can use it with this
Returns true
if the item exists, and false
if it does not exist.
I'll attach a simple example
#include <algorithm>
if ( std::find(vector.begin(), vector.end(), item) != vector.end() )
do_this();
else
do that();
568 Who developed the "avformat-59.dll" that comes with FFmpeg?
610 Uncaught (inpromise) Error on Electron: An object could not be cloned
600 GDB gets version error when attempting to debug with the Presense SDK (IDE)
577 PHP ssh2_scp_send fails to send files as intended
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.