my code is shown here:
#include <iostream>
#include <vector>
#include <string>
#include <stdlib.h>
using std::string;
using std::endl;
using std::cout;
using std::cin;
struct funcs
{
std::vector<int> values;
int sum;
void createVectorValues(){
while(values.size() < 100)
{
int x = rand() % 100;
values.push_back(x);
}
for(int& a : values)
{
sum += 1;
}
cout << sum;
}
};
int main()
{
srand;
funcs myFunct;
myFunct.createVectorValues();
}
the following code results in a large value such as -858993360
How can I change this code so that it can function properly