Answer:
Hi there Smartcreeper! You can declare structs in C++ to answer this question. Please refer to my explanation below.
Step-by-step explanation:
A struct in C++ allows us to define a structure with different data types into a single collection. The "emp[30];" at the end of the struct declares an array of the Server structure of size 30. The assignments to different components as required in the question are made and printed out to the console to verify.
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
struct Server {
string manufacturer;
string model;
string serialnum;
int year;
double clockSpeed;
int cores;
int ram;
int storage;
} emp[30];
int main()
{
int k = 5;
int d = 2;
emp[30].storage = 12;
emp[d].manufacturer = 3.50;
emp[k].model = "Hello";
cout << emp[30].storage << endl;
cout << emp[d].manufacturer << endl;
cout << emp[k].model << endl;
}