No Picture

Classes in C++

May 7, 2015 admin 0

class Rectangle { int width, height; public: void set_values (int,int); int area() {return width*height;} }; void Rectangle::set_values (int x, int y) { width = x; […]

No Picture

LL study

May 7, 2015 admin 0

#include <iostream> #include <string> using namespace std; class EmailList{ private: struct ContactNode{ string name; string email; ContactNode *next; }; ContactNode *head; public: EmailList(){ head = […]

No Picture

Structs in C++

May 7, 2015 admin 0

Here is an example program: struct database { int id_number; int age; float salary; }; int main() { database employee; //There is now an employee […]