What would the conditional expression be for another if statement? From my understanding, if pid > 0, then pid is considered a parent process and will always execute the else statement both my code expamples.
Thanks! I modified my code based on your suggestions and it now compiles :)
#include <iostream>
using namespace std;
class door
{
public:
door(){lock=true;}
void setlock(bool l);
private:
bool lock;
};
void door::setlock(bool l)
{
lock=l...
>Is that all in one file? (.h or .cpp?)
one cpp file
>In your person class you use a house* pointer before defining the house class.
I've tried a forward declaration of house before person and that reduced my errors to the following:
In member function `void person::opendoor(house*)'...
/*
Dev-C++ 4.9.9.2
Will someone be so kind as to explain why I get
these errors at compile time:
line 30: variable or field 'opendoor' declared void
line 30: 'int person::opendoor' is not a static member of 'class person'
line 30: 'house' was not declared in this scope
line 30: 'h' was not...
/* Hello, I'm attempting to write the function body for removePunctuation w/o loops. I've been playing around w/ the for_each algorithm to remove punctuation from a string s (which seems to be working fine), then copy the results into a new string t. For example, convert "a*^^bc__" to "abc"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.