Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~579 People Reached
Favorite Forums
Favorite Tags
c++ x 12
Member Avatar for sita12345

Hi, I would like to know how to add the objects of a vector?I wrote a code where it is adding the values to a specific object.I wanted to write a code where it can add all the values of all objects in a vector?

Member Avatar for Clinton Portis
0
120
Member Avatar for sita12345

Hi, main.cpp vector<Employee>e; e.push_back(Employee("Hawaii",100)); cout<<endl; e.push_back(Employee("Scotland",20)); cout<<endl; e.push_back(Person("Saga",30)); cout<<endl; Employee e1; //created an object sort(e.begin(),e.end()); e1.show(e); Employee.h bool operator<(const Employee& e1,const Employee& e2); Employee.cpp bool operator<(const Employee& e1,const Employee& e2) { return e1.getName() < e2.getName(); } With this code it is just sorting only the first 2 objects and displaying …

Member Avatar for Fbody
0
92
Member Avatar for sita12345

I am trying to write a simple code with if condition. If(x==1||x==2||x==3) { found true; } else { cout<<"Please provide the correct input"; cin<<input; } Based on this i need to have another condition: if(found) { cout<<"Enter number"; cin>>no; } The problem with the code is when i am entering …

Member Avatar for sita12345
0
115
Member Avatar for sita12345

Having assertion failure while deleting an element from a vector.What are the causes of assertion failure?

Member Avatar for sita12345
0
252