I know this might've been answered before but I've tried the answers and they don't work. I have a header file (test declaration.h) and a cpp file (definition of test.cpp) and finally a main cpp file (main.cpp). When I compile and run the project I get an error (C3861 'test': identifier not found). All of the files are in the same folder. I am using visual studio 2019. Why is this happening and what am I doing wrong?
EDIT
I have changed the files to not have spaces and now I get a linking error (LNK2019 unresolved external symbol "void __cdecl test(void)" (?test@@YAXXZ) referenced in function _main)
testdef.cpp
#include <iostream>
#include "test declaration.h"
using namespace std;
void test()
{
cout << "hi";
}
testdecl.h
#pragma once
void test();
main.cpp
#include <iostream>
#include "test declaration.h"
int main()
{
test();
}