1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
   | #include<iostream>
#include<math.h>
#include<vector>
using namespace std;
 
struct Inputs{
	double variable1;
	double variable2;
	double variable3;	
	};
 
 
void setupExemple (Inputs &i){
i.variable1 = 2;
i.variable2 = 3;
i.variable3 = 4;
}
 
void ma_fonction (const Inputs &i){	
	vector<int>variable4;
	for (int c = 0.6; c < 1; c= c+0.1){
		variable4.push_back(c);
		cout << i.variable1 + i.variable2+ i.variable3 + variable4 << endl;
	};
}
 
 
int main (int, char*[]){
	Inputs i;
	setupExemple (i);
	ma_fonction (i); | 
Partager