I'm having problems getting any programs with multiple cpp files to compile. I am using Dev-C++.
Here are my files:
Code:
//main.cpp
#include <iostream>
#include "functions.h"
using namespace std;
int main()
{
newFunction();
return 0;
}
Code:
//functions.h
void newFunction();
Code:
//functions.cpp
#include <iostream>
#include "functions.h"
void newFunction()
{
cout << "Hello \n";
}
Here is the error:
Code:
C:\Dev-Cpp\functions.cpp `cout' undeclared (first use this function)
I have tried to get several of these multi-cpp programs to compile but they all give various errors. Even a very simple one like this. I think I must be missing something that should be obvious here.
Thanks!