(не знаю, как добавлять файлы, поэтому я просто напишу их)
main.cpp
Код: Выделить всё
#include
using namespace std;
#include "tribe.h"
int main(){
Tribe t1;
initTribe(t1);
}
Код: Выделить всё
#pragma once
typedef struct
{
char name[20];
int age;
}Survivor;
void initSurvior(Survivor& s);
void printSurvivor(Survivor s);
Код: Выделить всё
#include
using namespace std;
#include "survivor.h"
void initSurvivor(Survivor& s)
{
cout > s.name;
cout > s.age;
}
void printSurvivor(Survivor s)
{
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78456618/using-vs-code-on-mac-this-ld-undefined-occurs-and-i-dont-know-why[/url]
Мобильная версия