No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I've got two member functions: [code=c] //Particle.h class Particle { public: bool isDead()const; static bool isDead(const Particle & par); }; //Particle.cpp bool Particle::isDead()const { return(xPos<=0 || xPos>=SCREEN_WIDTH || yPos<=0 || yPos>=GRASS_HEIGHT); } bool Particle::isDead(const Particle & par) { return(par.xPos<=0 || par.xPos>=SCREEN_WIDTH || par.yPos<=0 || par.yPos>=GRASS_HEIGHT); } [/code] But when a … |
|
I am trying to write a function which converts a number to a string. But when I return from the function, the reviving string - according to debug mode - still is empty, so the program outputs nothing. What am I doing wrong? [CODE=c] #include <iostream> #include <string> using namespace … |