No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello, I unfortunately failed my advanced c++ class last semester so I need to retake it. Our first assignment is to "Define a base class person that will contain universal information, including name, address, birth date, gender and identification (student, worker etc). Derive from this class the following classes: Student … | |
I'm using the directive pragma once in two header files. Both headers use vector, iterator, iostream, and string (and using namespace std). Some things may seem redundant and inefficient but it's the way our instructor wants us to write it. Anyways, in my file register.cpp, I want to include both … | |
Specifically, specific elements. A project requires us to delete elements in a vector via course number. I assumed one would use an iterator, so that being said, would this work? [CODE]void student::drop_course(int d) { vector<int>::iterator f = find(c_id.begin(), c_id.end(), d); vector.erase(f); cout << "You have deleted course number " << … | |
Re:
Hi Guys, Can someone please explain me why this is happening [code=cplusplus] #include<iostream> using namespace std; class a { public: int a1; // If I remove this it'll work fine a() { cout << "Constructor of a \n"; } ~a() { cout << "Destructor of a \n"; } }; class … |