I believe that the simplest way is to keep the largest number entered and, after each entry, check whether the number entered is greater than this, if yes becomes the largest entry.  
int main(void) {
    int cont, maior = 0;
    do {
        cout << "digite um valor: ";
        cin >> cont;
        //Se o valor entrado for maior que o ultimo passa ele a ser o maior
        if(cont > maior)maior = cont;
    }while (cont != -1);
    cout << "o maior numero e: " << maior;
    return 0;
}
See on Ideone
If you want you can use a function to make the comparison and return the largest of the two numbers:  
int getMaior(int a, int b);
int main(void) {
    int cont, maior = 0;
    do {
        cout << "digite um valor: ";
        cin >> cont;
        //Se o valor entrado for maior que o ultimo passa ele a ser o maior
        maior = getMaior(cont, maior);
    }while (cont != -1);
    cout << "o maior numero e: " << maior;
    return 0;
}
int getMaior(int a, int b){
    if (a>b) return a;
    return b;
}
See on Ideone
							
							
						 
Only I have to use functions.
– Ricardo Rodrigues
Easy, I’ll edit the answer.
– ramaral