Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 43
Member Avatar for jimmymack

Can someone please help me break down the following examples so they are easier to understand because I don't understand them at all. Many thanks in advance Evaluate the following: 1) (true && true) || false 2) (false && true) || true 3) (false && true) || false || true …

Member Avatar for v3ga
0
117
Member Avatar for jimmymack

[CODE]// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: virtual public Person { public: Teacher(std::string theName, std::string theClass); void teach(); void introduce(); …

Member Avatar for jimmymack
0
129
Member Avatar for jimmymack

[CODE]// Listing 14.4 // Add Function #include <iostream> class Counter { public: Counter(); Counter(int initialvalue); ~Counter() {} int GetItsVal()const {return itsVal; } void SetItsVal(int x) {itsVal = x; } Counter Add(const Counter &); private: int itsVal; }; Counter::Counter(int initialValue): itsVal(initialValue) {} Counter::Counter(): itsVal (0) {} Counter Counter::Add(const Counter & rhs) …

Member Avatar for jimmymack
0
140
Member Avatar for jimmymack

// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: public Person { public: Teacher(std::string theName, std::string theClass); void teach(); void introduce(); protected: …

Member Avatar for jimmymack
0
132
Member Avatar for jimmymack

[CODE]// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: public Person { public: Teacher(std::string theClass); void teach(); void introduce(); protected: std::string clazz; …

Member Avatar for jimmymack
0
156
Member Avatar for jimmymack

[CODE]// rational.cpp - Script 9.5 #include <iostream> #include <string> // Declare the class. class Rational { public: // Constructor: Rational(int num, int denom); // The overloaded methods that implement // arithmetic functions: Rational operator+(Rational rhs); Rational operator-(Rational rhs); Rational operator*(Rational rhs); Rational operator/(Rational rhs); void print(); private: // normalize() will …

Member Avatar for jimmymack
0
113
Member Avatar for jimmymack

[CODE]// rational.cpp - Script 9.5 #include <iostream> #include <string> // Declare the class. class Rational { public: // Constructor: Rational(int num, int denom); // The overloaded methods that implement // arithmetic functions: Rational operator+(Rational rhs); Rational operator-(Rational rhs); Rational operator*(Rational rhs); Rational operator/(Rational rhs); void print(); private: // normalize() will …

Member Avatar for jimmymack
0
150
Member Avatar for jimmymack

So I have a book on C but have Dev-C++ IDE and was wondering if I could learn C from that book whilst using the Dev-C++ IDE? Many thanks in advance!!

Member Avatar for TrustyTony
0
535
Member Avatar for jimmymack

[CODE]// petcount.cpp - Script 9.1 #include <iostream> #include <string> // Declare the class. class Pet { public: // Constructor and destructor. Pet(std::string theName); ~Pet(); void eat(); void sleep(); // Static method that will // return the current value of count: static int getCount(); protected: std::string name; private: // count will …

Member Avatar for jimmymack
0
150
Member Avatar for jimmymack

[CODE]#include <iostream> #include <string> // Declare the BaseClass. class BaseClass { public: // Constructor. BaseClass(); // Destructor. ~BaseClass(); // Simple method. void doSomething(); }; // Declare a SubClass that // inherits BaseClass. class SubClass : public BaseClass { public: // Constructor. SubClass(); // Destructor. ~SubClass(); }; // Define the functions. …

Member Avatar for mike_2000_17
0
96
Member Avatar for jimmymack

[CODE]// test.cpp - Script 6.7 #include <iostream> // Function prototype. // Function takes two arguements. // Function returns no values. void changeVar(int *myVar, int newValue); int main() { // Create a new variable. int myNum = 20; // Print its current value. std::cout << "myNum is " << myNum << …

Member Avatar for jimmymack
0
164
Member Avatar for jimmymack

[CODE]// quote.cpp - Script 4.6 // We need the iostream file in order // to use out and cin. #include <iostream> // We need the string file // For the string functionality #include <string> // Start the main function. int main() { // Declare the necessary variables. std::string quote, speaker; …

Member Avatar for jimmymack
0
211
Member Avatar for jimmymack

[CODE]// erase.cpp - Script 4.1 // We need the iostream file in order // to use cout and cin. #include <iostream> // Start the main function. int main() { // Declare a variable for the user input. // Single character to store yes (Y) or (N) char answer; // Prompt …

Member Avatar for jimmymack
0
104