Search
 
SCRIPT & CODE EXAMPLE
 

CPP

como copiar codigo de c++ con numeros de fila en docs

#ifndef MONSTRUO_H
#define MONSTRUO_H
#include<bits/stdc++.h>
#include "Explorador.h"
using namespace std;
class Monstruo {
    private:
        int valor;
        bool vivo;
    public:
        Monstruo(int _valor);
        int valorActual();
        void ouch(int divider);
        void hurtIt(Explorador* expl){
            expl->ouch(valor);
        };
        bool pista();
};
Monstruo::Monstruo (int valor){
    this->valor=valor;
    if(valor==0){
        vivo=true;
    }else{
        vivo=false;
    }
};
void Monstruo::ouch(int divider){
    if(valor % divider==0){
        valor=valor/divider;
    }
};
int Monstruo::valorActual(){
    return valor;
};
bool Monstruo::pista(){
    if(valor==1){
        valor=0;
        return true;
    }else{
        return false;
    }
}
#endif
Comment

PREVIOUS NEXT
Code Example
Cpp :: stack algorithm in c++ 
Cpp :: c++ sort numbers by magnitude/absolute value 
Cpp :: c++ map change order 
Cpp :: what does npl mean? 
Cpp :: convert c++ to c language 
Cpp :: Difference Array | Range update query in O 
Cpp :: c++ arrays 
Cpp :: code::block uncomment 
Cpp :: sort using comparator anonymous function c++ 
Cpp :: punteros a arrays 
Cpp :: how to extract a bit from a byte in c++ 
Cpp :: converting a string to lowercase inbuld function in cpp 
Cpp :: std remove example 
Cpp :: sfml get position 
Cpp :: c++ first index 0 or 1 
Cpp :: c++ string to vector using delimiter 
Cpp :: initialise a vector c++ 
Cpp :: result += a +b in c++ meaning 
Cpp :: c++ How can I make a std::vector of function pointers 
Cpp :: cf 633b trivial problem explanation 
Cpp :: decising how many numbers after comma c++ 
Cpp :: std::throw_with_nested 
Cpp :: time out search element in linked list c++ 
Cpp :: What will be the values of variables p, q and i at the end of following loop? int p = 5; int q = 18; for(int i=1;i&lt;5;i++) p++; --q; 
Cpp :: constant qualifier c++ "error display" 
Cpp :: Check if two stacks are the same using C++ 
Cpp :: c++ Is there still a need to provide default constructors to use STL containers 
Cpp :: executing linux scripts 
Cpp :: operator overload 
Cpp :: how a function gives a pointer as parameter c++ 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =