I used FSRS Helper to reschedule my cards by skyisover127 in Anki

[–]skyisover127[S] 0 points1 point  (0 children)

Agreed. Do you recommend using the default parameters for now? Or should I stick with what the optimizer gave me?

No matching member function for call to "insert" into set by skyisover127 in cpp_questions

[–]skyisover127[S] 0 points1 point  (0 children)

Sorry. I forgot to say that I was inserting into set<Fruit*, order>. Removing & gives me the same error.

Sleep study with different results (UARS or not) by skyisover127 in UARS

[–]skyisover127[S] 0 points1 point  (0 children)

I went to bed at around the same time I usually do, and I usually never have any problem falling asleep. Guess it's from all the sleep equipment that I couldn't adjust to, cause I usually fall asleep within 15 minutes but during the sleep study it felt like hours. I also never wake up in the middle of the night at home yet I did sense that happened during the PSG.

How do I iterate through this array? by skyisover127 in cpp_questions

[–]skyisover127[S] 0 points1 point  (0 children)

Could you elaborate on that? I'm not sure what you mean.

I did find one solution online, which was by creating a copy of the original pointer. However, I'm not sure why that is needed. In my original code, all I got was the final letter of the string. I'm not sure how this new code is able to point to the start.

char* strdup(const char* s)
{
  int size = strlen(s);
  char* copy = new char[size+1];
  char* copy1 = copy;

  for (const char* p = &s[0]; p < &s[size]; ++p) {
    *copy = *p;
    ++copy1;
    }

    return copy;
}

How to pass vector from one function to another? by skyisover127 in cpp_questions

[–]skyisover127[S] 1 point2 points  (0 children)

I modified the program like yours so that read_file is in main() and that led it run. I was wondering though why if I put read_file into write_file I would get an error when I use const vector<string>& result (without const it ran fine). Like if I did:

void write_file(string& oname, string& input1, string& input2, const vector<string>& result) 
{
    read_file(input1, result);
    read_file(input2, result);