I make one program for the experiment and there was one mistake. Made a new project and left the same function and the same properties, but the error remained, what could be the matter? Error: the function "int main (void)" already has implementation text ( C2084 )
Source.cpp
#include <iostream> #include <Windows.h> #include "func.h" using namespace std; void Interface(); int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); Interface(); } func.h
#pragma once #include "Source.cpp" void Interface() { int quest; while (true) { cout << "1. Открыть базу" << endl; cout << "2. Закрыть программу" << endl; cout << "Номер пути _\b"; cin >> quest; if (quest = 1) { cout << "Открыто!"; } else if (quest = 2) { cout << "Закрыто!"; } } }
.cppfile? - pavel