Trouble with objects project

The exercise is https://www.codecademy.com/courses/learn-c-plus-plus/projects/cpp-dating-profile
When I compile the code, I get an error saying that “Profile” does not name a type that looks like this. here is my code.

#include <iostream>
#include "profile.hpp"
int main() {
Profile sam("Sam Drakkila", 30, "New York", "USA", "he/him");

}
#include <vector>
#include <iostream>
class Profile {
  private:
  std::string name;
  int age;
  std::string city;
  std::string country;
  std::string pronouns;
  std::vector<std::string> hobbies;
  public:
  Profile(std::string new_name, int new_age, std::string new_city, std::string new_country, std::string new_pronouns = "they/them");
};
#include <iostream>
Profile::Profile(std::string new_name, int new_age, std::string new_city, std::string new_country, std::string new_pronouns = "they/them")
  : name(new_name), age(new_age), city(new_city), country(new_country), pronouns(new_pronouns) {
    
  }

From the instructions in step 5:

Define the constructor in profile.cpp and assign the attributes the values passed in. (Don’t give pronouns a default value in the definition.)

Your code:

You just need to remove the default assignment to std::string new_pronouns in your definition in the profile.cpp file.
Hope this helps! && Happy Coding!

I changed my code so that it looks like this,

#include <iostream>
Profile::Profile(std::string new_name, int new_age, std::string new_city, std::string new_country, std::string new_pronouns)
  : name(new_name), age(new_age), city(new_city), country(new_country), pronouns(new_pronouns) {
    
  }

but I get the same error. Any other suggestions?

That was the only thing I noticed. Did you click “Save”, and then compile again?

I did. I’m starting to think that it might be a bug with how new that part of the course is. I’ll send in a report with that assumption.

Hey, I just took another look at your code, and realized you’re missing the #include "profile.hpp" in your profile.cpp file. Sorry I didn’t catch it sooner.