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
~1K People Reached
Favorite Forums
Favorite Tags
c++ x 4
Member Avatar for GottaLove

Suppose I have a code: Class A have items which is pushed into a vector...I want to access Class A element from class B through A's vector.. class A { friend class B; vector<A> data; //store info in vector }; Class B { void showDataInClassA(); A a; } void B::showDataInClassA() …

Member Avatar for Ancient Dragon
0
903
Member Avatar for GottaLove

ASsuming in class , i have: class math { private: int x,y; public: bool operator>(const math& ); bool operator<(const math& ); } bool Point2D::operator>(const math &p) { return (this->x > p.x); } bool Point2D::operator<(const math &p ) { return (this->x < p.x); } bool Point2D::operator>(const math &p) { return (this->y …

Member Avatar for deceptikon
0
193
Member Avatar for Tom_Weston

I have no idea how this would be done, but how would I check the amount of line that exist in a text file. [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( myfile.good() ) …

Member Avatar for L7Sqr
0
98
Member Avatar for GottaLove

Hi , Assuming I have a text file containing numbers , exp : 1_234 And i want to store 1 as int ID1, 234 as ID2. How can I skip underscore "_" ? ifstream infile; infile >> ID1 >> ID2 , ??? I'm still not sure Thanks .

Member Avatar for WaltP
0
159