I'm borderline embarrassed to be posting a question that I know the answer is probably going to be super-trivial to.
All I'm trying to do is call a function from my main file that I've declared/defined in a separate file, but I'm getting a link error when I try to do it and don't know what the problem is.
hello_world.cpp:
print.h:Code:#include "stdafx.h"#include <stdio.h> #include "print.h" int main() { printTest(); return 0; }
print.cpp:Code:void printTest();
If someone could put me out of my misery here I'd be most obligedCode:#include <stdio.h> void printTest() { cout << "test!" << endl; }![]()



LinkBack URL
About LinkBacks




