employee-module.cppm:
Код: Выделить всё
export module employee;
export struct Employee {
char firstInitial;
char lastInitial;
int employeeNumber;
int salary;
};
Код: Выделить всё
#ifdef __INTELLISENSE__
#include
#include
#include "employee-module.cppm"
#else
import ;
import ;
import employee;
#endif
using namespace std;
int main() {
Employee anEmployee;
anEmployee.firstInitial = 'J';
anEmployee.lastInitial = 'D';
anEmployee.employeeNumber = 42;
anEmployee.salary = 80'000;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/77687836/why-am-i-getting-a-linker-error-when-i-try-to-link-something-using-stdformat[/url]
Мобильная версия