#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
// Returns a fixed-width formatted record
std::string formatRecord(const std::string& name,
int age,
double salary)
{
std::ostringstream oss;
// Format fields with fixed widths
oss << std::left
<< std::setw(15) << name
<< std::setw(10) << age
<< std::setw(12) << salary;
return oss.str();
}
int main()
{
std::string result = formatRecord("Atlas ", 30, 95000.0);
std::cout << result << '\n';
}
/*
run:
Atlas 30 95000
*/