I have a vector that with your help I succeeded to make it work just fine.
Now I want to make the same vector to work with float values but just doesn't want to make me the mathematics with float numbers.
Is adding only the integers and not the float numbers.

#include <vector>
#include <numeric>
#include <functional>
#include <iostream>
using namespace std;
typedef vector<float> VECTORINT;
typedef vector<int> VECTORINT1;
int main()
	VECTORINT Vectorul;
	VECTORINT1 Categorii;
	//int y;
	float x;
	int num;
	int categ;
	float  total = 0.00; //sum?
	int total_categ;
	cout<<"Introduceti the number of dimensions: ";
	cin >> num;  //the number of numbers that must be entered
	for( float i = 0; i < num; i++ )
		cout<<"Introduce the dimensions: ";
		cin >> x;
		//y += x; //either add them here
		//for( int j = 0; j < Vectorul.size(); j++ ) //do not nest for() loops with the same variable
			//cout << Vectorul[j] << endl; //seems kinda pointless and just clutters the input/output
	cout<<"Introdfuce the numbers of categories: ";
	for(int j = 0; j<categ; j++)
		cout<<"Introduceti categoriile: ";
	//for( int i = 0; i < Vectorul.size(); i++ )
	//y += Vectorul[i]; //or add them here BUT do not include both of these sections
    total = accumulate(Vectorul.begin(), Vectorul.end(), 0);
	/total_categ = accumulate(Categorii.begin(), Categorii.end(), 0);
	return 0;

I beat my head all night at work what to do but I couldn't find any solution.

If you are going to use the accumulate function to add floating-point numbers together, the third argument has to be 0.0, not 0

This question has already been answered. Start a new discussion instead.