« first day (1837 days earlier)      last day (1022 days later) » 

mr5
12:41 AM
- It is marked inline (in your case this doesn't seem very judicious)
- It is a function template
- It is a member function
That is the only time it is valid to define the body of a function in header file
One reason I am defining the body in header file is because of that library also. Each model has their own header file which includes the JSON serializer/deserializer function. I guess I need to use inline keyword for those functions then.
Or put every JSON serializer/deserializer in a one big header file.
 
 
11 hours later…
nwp
11:55 AM
 
 
3 hours later…
3:10 PM
if you have a string a and a string b. you can start anywhere and you need to spell string b
you can only go right a number of steps, then left some steps. the letters you cross should spell the string b
i am getting stuck in while loops, is there an obvious better way?
 
nwp
Intuitively it sounds like a problem solvable with backtracking.
 
haha im stuck in various loops and edge cases, the other thing i thought about was longest palindrome in string b
 
it does sound like the typical "this is what you need dynamic pogramming for" problem, that you rarely seem to encounter in real life
 
ah its not dp i dont think, there isnt a substructure
yeah its not real work, but very interesting problem
 
 
2 hours later…
5:31 PM
hi
void skipToNextPuzzle(Game &current_game)
{
    Game next_case = static_cast<Game>(static_cast<int>(current_game) + 1);
    if (static_cast<int>(next_case) == 7)
    {
        next_case = static_cast<Game>(0);
    }
}
is this a correct implementation of a next function in order to move to the next element of an enum ?
the enum has from 0 to 7 (0,1,2,3,4,5,6,7) values
@PeterT can you give me a piece of advice please?
 

« first day (1837 days earlier)      last day (1022 days later) »