passing ‘const this argument discards qualifiers [-fpermissive]

Since c is of type const Cache *, you can only call const member functions on it.

You have two options:

(1) remove const from the declaration of c;

(2) change Cache::write() like so:

 bool write(const MemoryAccess &memory_access, CacheLine &cl) const;

(Note the added const at the end.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)