Can I use a local struct to store data in the "set" conatiner? If so, what is the correct method to do so?
Compiler: Sun Studio 10 on Unix (Sun Solaris)
#include<iostream>
#include<set>
...
Type: Posts; User: slrj
Can I use a local struct to store data in the "set" conatiner? If so, what is the correct method to do so?
Compiler: Sun Studio 10 on Unix (Sun Solaris)
#include<iostream>
#include<set>
...
Salem,
Thanks for your explanation. I understand now.
Thx.
Salem,
I have updated the code in post 1, to show the usage of CST_CC_ERR. Do you have anymore comments?
Thanks.
Can someone explain me what's going on in the code below. As per my knowledge "#define <macro name> <Macro replacement>" doesn't have a semicolon and it's terminated by a new line. But the code line...
Microsoft Visual C++ 6.0
Code comiples on Unix (Solaris) but not on Visual C++? Any suggestions....
--------------------Configuration: useProduct - Win32 Debug--------------------
Compiling...
product.cpp
c:\scc\assign...
Typo caught in definition of the overloaded function (&operator>>). The parameter "input" should have been of type "istream" instead of "ostream".
Incorrect Definition:
istream &operator...
Skeane,
I do have "using namespace std:" declared in the .cpp class definition, but the problem still persists. Do you have any other suggestions?
The overloading of extraction operator(>>) is giving the following errors. The insertion (<<)operator is working within the code. It looks like there are some header files missing to be included? or...
ChaosEngine/Decrypt/Imalc,
I really appreciate your help and tips. My code works now.
Thanks.
I am trying to overload operator+=, so that "obj += n" functionality can be accomplished. The code below doesn't put the new value added value of "obj + n" in obj data member.
Can somebody...
It worked finally!! Thanks a lot for the quick reply.
Thanks zx-1, for you reply. But I am still having the issue.
Declaration-->
friend double operator+(const double&, const product &);
Definition-->
double product:: operator +(const double &...
I need help to overload the operator + in the format (z + obj2).
I have done it in two formats where 'n' becomes the sum of two objects and 'z' is z (scalar variable/constant/expression).
1. n =...