I have a problem with the Space Age exercise because I don't know what to put in the .h file. I know that when I only need to program functions I just declare them there. For example for the reverse string code
namespace reverse_string {
std::string reverse_string(std::string text){
int size = text.size();
std::string newString;
for(int i = 0; i < size; i ++){
newString += text[size - i - 1];
}
return newString;
}
} // namespace reverse_string
```cpp
You needed to put this into the .h file
```cpp
#if !defined(REVERSE_STRING_H)
#define REVERSE_STRING_H
#include <string>
namespace reverse_string {
std::string reverse_string(std::string text);
} // namespace reverse_string
#endif // REVERSE_STRING_H
```cpp
But in the Space Age exercise you need to create a function and I have tried to put everything in the .h file and nothing works. This is my, I think, correct code
```cpp
#include "space_age.h"
namespace space_age {
class space_age{
public:
int seconds(){
return sec;
}
space_age(int newSec){
sec = newSec;
}
double on_earth(){
return sec / 31557600.00;
}
double on_mercury(){
return on_earth() / 0.2408467;
}
double on_venus(){
return on_earth() / 0.61519726;
}
private:
int sec;
};
} // namespace space_age
```cpp
And this is my .h file that does not work
```cpp
#if !defined(SPACE_AGE_H)
#define SPACE_AGE_H
namespace space_age {
class space_age {
public:
space_age(int newSec);
int seconds();
double onEarth();
double onMercury();
double onVenus();
private:
int sec;
};
} // namespace space_age
#endif // SPACE_AGE_H
```cpp
I am all out of ideas what to do. Can you please tell me what should I put there?