UFO Freeform project problem

Hello guys,
I need some help for the UFO project, I am stuck at step 2…
This step should be super easy and I really don’t see what I am doing wrong, but for some reason the program is not running.

Here is what step 2 is asking:

Here is what I did.

UFO.cpp file to define the function:

#include < iostream >
#include < vector >

// Define functions

void greet() {

std::cout << “=============\n”;
std::cout << “UFO: The Game\n”;
std::cout << “=============\n”;
std::cout << “Instructions: save your friend from alien abduction by guessing the letters in the codeword.\n”;


UFO header file to declare the function:

#include < vector >

void display_misses(int misses);

// Declare functions
void greet();

UFO main file:

#include < iostream >
#include “ufo_functions.hpp”

int main() {


Do you guys know why this is not working?

Thank you very much,


ps: here’s the link of the problem => https://www.codecademy.com/courses/learn-c-plus-plus/projects/cpp-ufo

Never mind guys, I figured it out.
That was because I was not compiling it correctly.
I was just writing g++ ufo.cpp instead of g++ ufo.cpp ufo_functions.cpp

1 Like