This is my code:
#include <algorithm> void f() { int[] a = {1, 2, 3, 4}; int[] b = {1, 2, 100, 101}; // I want to do something like this: // int* found = compare(a[0], a[3], b[0]); // in order to get a pointer to a[2] }
Perhaps I skipped this algorithm in the manual ... Please help :)
Sort your array and use mismatch .
See std :: mismatch
Source: https://habr.com/ru/post/1310833/More articles:Grails gdoc editor support (esp IntelliJ) - vimZero and empty values - c #Is it better to use GL_FIXED or GL_FLOAT on Android? - performanceDrupal Feeds featuring HTML encoded markup - drupalDoes a KeyError say the key (partner) is not in the dict? - pythonin python how to remove this \ n from a string or list - pythonPHP preg_replace oddity with pound sign and ã - phpIs there a summary of the rendering / behavior differences between QtWebKit and the Chrome / Safari WebKit browser? - qtWindows temporary file in Java - javaHow can I save a large Perl object for reuse between runs? - serializationAll Articles