Раздельная компиляция error C2182
аheader.h
#pragma once
#ifndef test_H_
#define test_H_
void test(string& vr);
#endif
test_f.cpp
#include <cstring>
#include <iostream>
#include "header.h"
using namespace std;
void test(string& vr){
vr = "123";
}
test.cpp
#include <iostream>
#include "header.h"
using namespace std;
int main()
{
string vr;
test(vr);
cout << vr;
cout << "pause..." << endl;
system("pause>nul");
return 0;
}
1>------ Build started: Project: test, Configuration: Debug x64 ------ 1>test.cpp 1>C:\test\test\header.h(6,6): error C2182: 'test': this use of 'void' is not valid 1>C:\test\test\header.h(6,11): error C2065: 'string': undeclared identifier 1>C:\test\test\header.h(6,19): error C2065: 'vr': undeclared identifier 1>C:\test\test\test.cpp(9,5): error C2064: term does not evaluate to a function taking 1 arguments
Подскажите что делаю не так?