You're not overloading anything. Your class B contains an object of type A, is all. A's own member functions are called to handle and copy objects of type A.
If the B class was descended from the A class, that would be overloading, if you overloaded its copy constructor.
Here, class B is derived from class A, and provides an alternative copy constructor, which gets used instead of A's.
When reading over some perl code in a software document, I came across an assignment statement like this
$PATH = ${PROJECT}/......./....
In this particular form of scalar variable assignment, what does the curly braces operators do ? Also, what is the benefit in doing scalar assignment this... (3 Replies)
Hello everyone!
Suppose that I have something like this
A a;
a.mem=new int;
A b = a;
where
class A {
public:
int * mem;
A() : mem(NULL) {
}
~A() {
if (mem!=NULL)
delete mem; (1 Reply)
1. List commands
to create the directory hierarchy $HOME/a/b/c
in vi to replace all occurences of TMP with tmp in lines 1 through 10
in vi to replace first occurence of CPU_file with DISK_file at line 15
2. Explain with a very simple example, usage of "ls -a"
3. What do the... (2 Replies)
Hi Folks,
I'm looking to figure something out in an existing script I'm trying to understand.
the command in question(on a Solaris Box using KSH) is: WORKDIR=/tmp/namereplaced.exec.$$.$RANDOM
Now, I know it's setting the $workdir environmental variable...
And I understand most of... (2 Replies)
Hello all im currently working on this assignment and a little stump on how to check for an argument heres the instructions:
Step 4:
Modify your script so that if there is an argument called TestError you display the following error message with your usage statement.
TestError found
Example:... (1 Reply)
Does anyone know how this line in bash works?
local gotbase= force= nicelevel corelimit
local pid base= user= nice= bg= pid_file=
local cgroup=
These lines are part of the daemon function inside the "functions" file at /etc/init.d in RH. (3 Replies)
I have a little code block (executing on AIX 7.1) that I cannot understand why the NOTFREE=0 does not appear to be assigned even though it goes through that block. This causes a unary operator issue.
#!/bin/bash
PLATFORM="AIX"
NEEDSPC=3000
set -x
if ; then
lsvg | grep -v rootvg | while... (6 Replies)
Discussion started by: port43
6 Replies
LEARN ABOUT CENTOS
std::gslice_array
std::gslice_array< _Tp >(3) Library Functions Manual std::gslice_array< _Tp >(3)
NAME
std::gslice_array< _Tp > -
SYNOPSIS
Public Types
typedef _Tp value_type
Public Member Functions
gslice_array (const gslice_array &)
void operator%= (const valarray< _Tp > &) const
template<class _Dom > void operator%= (const _Expr< _Dom, _Tp > &) const
void operator&= (const valarray< _Tp > &) const
template<class _Dom > void operator&= (const _Expr< _Dom, _Tp > &) const
void operator*= (const valarray< _Tp > &) const
template<class _Dom > void operator*= (const _Expr< _Dom, _Tp > &) const
void operator+= (const valarray< _Tp > &) const
template<class _Dom > void operator+= (const _Expr< _Dom, _Tp > &) const
void operator-= (const valarray< _Tp > &) const
template<class _Dom > void operator-= (const _Expr< _Dom, _Tp > &) const
void operator/= (const valarray< _Tp > &) const
template<class _Dom > void operator/= (const _Expr< _Dom, _Tp > &) const
void operator<<= (const valarray< _Tp > &) const
template<class _Dom > void operator<<= (const _Expr< _Dom, _Tp > &) const
gslice_array & operator= (const gslice_array &)
void operator= (const valarray< _Tp > &) const
void operator= (const _Tp &) const
template<class _Dom > void operator= (const _Expr< _Dom, _Tp > &) const
void operator>>= (const valarray< _Tp > &) const
template<class _Dom > void operator>>= (const _Expr< _Dom, _Tp > &) const
void operator^= (const valarray< _Tp > &) const
template<class _Dom > void operator^= (const _Expr< _Dom, _Tp > &) const
void operator|= (const valarray< _Tp > &) const
template<class _Dom > void operator|= (const _Expr< _Dom, _Tp > &) const
Friends
class valarray< _Tp >
Detailed Description
template<class _Tp>class std::gslice_array< _Tp >
Reference to multi-dimensional subset of an array.
A gslice_array is a reference to the actual elements of an array specified by a gslice. The way to get a gslice_array is to call
operator[](gslice) on a valarray. The returned gslice_array then permits carrying operations out on the referenced subset of elements in
the original valarray. For example, operator+=(valarray) will add values to the subset of elements in the underlying valarray this
gslice_array refers to.
Parameters:
Tp Element type.
Definition at line 82 of file valarray.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
libstdc++ Tue Jun 10 2014 std::gslice_array< _Tp >(3)