Tikilluni funktioni C++-imi, tuluttut ilinniartut tamakkit siulittaasorlutik isumaginniartut taallut.
Piiaqqissat tulleri C++-imi, taanna kingorna kingusinnerpaat qanoq ineriartornera kingorna kingusinnerpaat kingorna ineriartornera:

``` c++
#include <iostream>
#include <string>
using namespace std;

int kingusinnerpaatQanoq(source kingorna, search kingorna)
{
    int qanoq = 0;
    int pos = source.find(search, 0); 
    while (pos != string::npos)
    {
        qanoq++; 
        pos = source.find(search, pos + 1); 
    }
    return qanoq;
}
``` 

Tulleri sinerlutik, kingusinnerpaat qanoq ilinniartitsisut:

``` c++
int main()
{
    string source = "Ilagiittut AI-mi. AI-mi ujartuullunilu."
    string search = "AI";
    cout << search << " qanoq " << kingusinnerpaatQanoq(source, search) << " sinerlutaasuat kingorna ineriartornera." << endl; 
    return 0;
}
```