example.h
#pragma once
#include<vector>
class example
{
public:
static const double rate;
static const int vecSize;
static std::vector<double> vec;
};
example.cpp
#include "example.h"
const int example::vecSize = 5;
const double example::rate = 0.5;
std::vector<double> example::vec;
main.cpp
#include"example.h"
#include<iostream>
int main()
{
std::cout << example::rate << std::endl;
std::cout << example::vecSize << std::endl;
return 0;
}