#include<bits/stdc++.h> using namespace std; struct dino{int a,b;}c[123]; int n,m; ... int main(){ c[5]=(dino){n,m}; ... }