C++ Pastebin - Nopaste - Paste - easy sharing of text and codes

Posted by blue_anna on Sat 4th Sep 02:14 (modification of post by blue_anna view diff)
View followups from blue_anna | diff | download | new post

  1.                                   const monsters cmon = agent->as_monster();
  2.                                   monsters* mon = &cmon;
  3.                                   agent->as_monster()->hurt(this, initial_damage, flavour, cleanup_dead);    
  4.  
  5.     DEPEND monster.d
  6.     CXX monster.o
  7. monster.cc: In member function ‘virtual int monsters::hurt(const actor*, int, beam_type, bool):
  8. monster.cc:3488: error: conversion from ‘const monsters*’ to non-scalar type ‘const monsters’ requested
  9. monster.cc:3489: error: invalid conversion from ‘const monsters*’ to ‘monsters*
  10. monster.cc:3490: error: passing ‘const monsters’ as ‘this’ argument of ‘virtual int monsters::hurt(const actor*, int, beam_type, bool)’ discards qualifiers
  11. monster.cc:3489: warning: unused variable ‘mon’
  12. make: *** [monster.o] Error 1

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


I'm Human
Remember me



Captcha required for posting