Другие языки программирования и технологии

я плохо знаю с++ помогите пожалуйста исправить программу

Необходимо исправить программу на писаную на с++,так что бы числа писались рондомно, а не как в этой программе вручную,
#include <iostream>
using namespace std;
void bubbleSort(int array[], int col){
int temp=0;
for (int i=1; i<col>array [j+1]){
temp=array[j];
array [j]=array [j+1];
array [j+1]=temp;
}
}
}
}

int main(){
int i, size;
int *array;
cout << "Bubble Sort.\nEnter array dimension: ";
cin >> size;
array = new int[size];
cout << "Enter " << size << " elements: ";
for ( i = 0; i < size; i ++ ){
cin >> array;
}

bubbleSort( array, size );

cout << "Your array after sorting: ";
for ( i = 0; i < size; i ++ ){
cout << array << " ";
}
cout << "\nPress \"Enter\" to continue..." << endl;
cin.sync();
cin.get();
}
#include <iostream>
#include <iomanip>
#include <ctime>
using namespace std;
int * random(const size_t);
void input_size_t(size_t &);
void print(int *, const size_t);
void bubble(int *, const size_t);
int main() {
    setlocale(LC_CTYPE, "Russian_Russia.1251");
    size_t size = 0;
    input_size_t(size);
    int * v = NULL;
    if (v = random(size)) {
        print(v, size);
        bubble(v, size);
        print(v, size);
        delete[] v;
        v = NULL;
    }
    cin.get(); cin.get();
    return 0;
}
int * random(const size_t _size) {
    int * v = NULL;
    if (v = new (nothrow) int [_size]) {
        srand(static_cast<unsigned>(time(NULL)));
        for (size_t n = 0; n < _size; ++n) v[n] = rand() - SHRT_MAX / 2;
    }
    return v;
}
void input_size_t(size_t & _size_t) {
    do {        
        cout << " Введите размер массива: ";
        cin >> _size_t;
        if (cin.good()) break;
        else {
            cin.clear();
            cin.ignore(80,'\n');
            cout << "\a Ошибка! \n";
        }
    } while (true);
}
void print(int * _v, const size_t _size) {
    for (size_t n = 0; n < _size; ++n) cout << setw(8) << _v[n];
    cout << endl;
}
void bubble(int * _v, const size_t _size) {
    int temp;
    size_t m;
    for (size_t n = 1; n < _size; n++)
        for (m = 0; m < _size - n; m++)
            if (_v[m] > _v[m + 1]) {
                temp = _v[m];
                _v[m] = _v[m + 1];
                _v[m + 1] = temp;
            }
}
СС
Сергей Сарапульцев
63 339
Лучший ответ
массив в цикле нужно указывать с оператором индексации .
И условие выхода из цикла в функции B ubble sort i<col>array[i+1].
Перепроверяй свой код, у тебя много синтаксических ошибок.