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
~4K People Reached
Favorite Forums
Favorite Tags
Member Avatar for learningcpp

Hi, I know that I can overlaod the operator >> and << and declare it as a friend function in the class for which i am overloading and then write the definition outside of the class. But recently I was writing a string class for myself only to learn and …

Member Avatar for m4ster_r0shi
0
347
Member Avatar for learningcpp

Hi All, I am facing issue again and would be great if you help me to understand this code: [CODE] #include <iostream> #include <ostream> using namespace std; class A{ int a; public: A(int a):a(a){ } A operator+(A &other){ A aaa(a+other.a); return aaa; } friend ostream& operator<<(ostream &stream, A &aa){ stream …

Member Avatar for learningcpp
0
160
Member Avatar for learningcpp

Hi Guys, Can you please guide me to a documentation/link where I can read about Interpositioning and what does it mean? Thanks in advance. S.

Member Avatar for rubberman
0
76
Member Avatar for learningcpp

Hi Guys, Can you please enlighten me, why the following output is this way? I thought A class size is the summation of the byte size of its member variables. My machine is a 64 bit machine. [CODE] #include <iostream> using namespace std; class A{ public: char y; int x; …

Member Avatar for mike_2000_17
0
171
Member Avatar for learningcpp

Hi Guys, What is the scope of the exception variables when I catch them by reference. [CODE] try{ throw AnExceptionObect("Exception message"); } catch(AnExceptionObect &exp){ logger << exp.what(); //logger is a dummy object throw; //what will happend now? is it going to be throwen by value? and what if I catch …

Member Avatar for learningcpp
0
196
Member Avatar for learningcpp

Hi All, Can you please help me to understand why the following code is behaving this way? I think both outputs should be 1 ( 1 means const T), but its not!! [CODE] template <typename T> struct IsConst{ enum {isConst = 0}; }; template <typename T> struct IsConst<const T>{ enum …

Member Avatar for learningcpp
1
3K
Member Avatar for svatstika

Hi everyone! I'm trying to creat a class calling INT, which is equivalent to type int. I think we must creat every operator for this class like: +, -, *, /, %, pow(x,y),... I've never seen how does type int look like? May someone give me a introduction to type …

Member Avatar for mrnutty
0
190
Member Avatar for learningcpp

Hi, I am new at CPP. I am trying to create a list using STL. I was looking at the pop_back() method, and it says that it delete the element from the list and also calls it's destructor. so myelement = list.back(); i can access it. list.pop_back() will delete the …

Member Avatar for Dakurels
0
128