12-06-2018
That means the expression 'str2=whatever' returns void -- or rather, returns nothing. So there's nothing to cout.
Instead have it return const myString & and at the end, put return(*this);
10 More Discussions You Might Find Interesting
1. AIX
Hi,
I have a piece of C++ code that can be compiled using g++, but reports an error when compiled with xlC:
xlC -DHAVE_CONFIG_H -I../SRC -I../include -DNoChange -DSPRNG_MPI -q64 -DLONG64=long -I/usr/lpp/ppe.poe/include -DLONG64=long -c -o libsprng_a-bignum.o bignum.cpp
"bignum.cpp",... (1 Reply)
Discussion started by: luop0812
1 Replies
2. UNIX for Dummies Questions & Answers
Hi
I am doing a script like
if
then
echo "table name dosent exist"
exit
fi
the problem is if $table_name is null then i am getting the error
Please help me
Thanks in advance (2 Replies)
Discussion started by: ssuresh1999
2 Replies
3. Programming
Hi All,
In C++ one operator can be overloaded, but it can't be overloaded by it's own derieved class
Please let me know operator.
Thanks,
Naga:cool: (1 Reply)
Discussion started by: Nagapandi
1 Replies
4. UNIX for Dummies Questions & Answers
hi
i am using the below code
grep -v '^$' file1.lst >file1.lst
but it gives file1.lst already exists.
And i want to over rite on the same file
Whats the work around? (5 Replies)
Discussion started by: jathin12
5 Replies
5. UNIX for Dummies Questions & Answers
find . -name "*.*"|xargs grep WT:DBF_WL>> $F
Wfexist=`cat $F|grep $i`
echo $Wfexist
if ;
then
echo $Wfexist
echo "Workflow Exist"
else
touch $O
chmod 777 $O
echo $Wfexist
echo $WfExist >> $O
fi
I am getting the error that -ne: unary operator expected in the line with red... (2 Replies)
Discussion started by: ritu.s
2 Replies
6. Programming
Hi,
I have an requirement to overload the delete operator in C++, but it should also accept the sizeof() the object that is to be deleted. Actually I am trying to built a custom memory allocator and deallocator like a pool, which makes me to overload the delete operator.
Small example of the... (1 Reply)
Discussion started by: kapilkumawat
1 Replies
7. UNIX for Dummies Questions & Answers
Why am I getting this error.... #!/bin/sh
# iOS-Ad-Remover
# Marshall Ford @ marshallbford@gmail.com
# This project is hosted @ http://ios-ad-
# remover.sourceforge.net
# Under the GNU GPL open source license
clear
echo
if ; then echo "You need to be root to run this script."; exit 0; #... (24 Replies)
Discussion started by: mbf123
24 Replies
8. Programming
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)
Discussion started by: bashuser2
1 Replies
9. UNIX for Dummies Questions & Answers
Hi bros
I have a VPS 512mb (Burst 2GB) with Kloxo installed and hosting few sites on it with not much traffic
I am facing high cpu load for the last few days and seems mysqld is overloading the cpu
Any suggestion will be appreciated
Regards
Rizwan
Top output is as under
top -... (2 Replies)
Discussion started by: rizwan65
2 Replies
10. Shell Programming and Scripting
Hello Unix forum.
I'm encountering the following error "binary operator expected error" and I cannot seem to solve the issue.
I have the following source files to process:
CPA_LOOKUP_dat.lst
PROFILE_TXN__dat.lst
TRANSACTION_CODE_dat.lst
PROFILE_TXN_OUT_OF_BALANCE_dat.lst ... (2 Replies)
Discussion started by: pchang
2 Replies
LEARN ABOUT DEBIAN
tau_get_func_vals
TAU_GET_FUNC_VALS(3) TAU Instrumentation API TAU_GET_FUNC_VALS(3)
NAME
TAU_GET_FUNC_VALS - Gets detailed performance data for given functions
SYNOPSIS
C/C++:
TAU_GET_FUNC_VALS(const char **inFuncs, int numOfFuncs, double ***counterExclusiveValues, double ***counterInclusiveValues,
int **numOfCalls, int **numOfSubRoutines, const char ***counterNames, int *numOfCounters, int tid);
DESCRIPTION
It gets detailed performance data for the list of routines. The user specifies inFuncs and the number of routines; TAU then returns the
other arguments with the performance data. counterExclusiveValues and counterInclusiveValues are two dimensional arrays: the first
dimension is the routine id and the second is counter id. The value is indexed by these two dimensions. numCalls and numSubrs (or child
routines) are one dimensional arrays.
EXAMPLE
C/C++ :
const char **inFuncs;
/* The first dimension is functions, and the
second dimension is counters */
double **counterExclusiveValues;
double **counterInclusiveValues;
int *numOfCalls;
int *numOfSubRoutines;
const char **counterNames;
int numOfCouns;
TAU_GET_FUNC_NAMES(functionList, numOfFunctions);
/* We are only interested in the first two routines
that are executing in this context. So, we allocate
space for two routine names and get the performance
data for these two routines at runtime. */
if (numOfFunctions >=2 ) {
inFuncs = (const char **) malloc(sizeof(const char *) * 2);
inFuncs[0] = functionList[0];
inFuncs[1] = functionList[1];
//Just to show consistency.
TAU_DB_DUMP();
TAU_GET_FUNC_VALS(inFuncs, 2,
counterExclusiveValues,
counterInclusiveValues,
numOfCalls,
numOfSubRoutines,
counterNames,
numOfCouns);
TAU_DUMP_FUNC_VALS_INCR(inFuncs, 2);
cout << "@@@@@@@@@@@@@@@" << endl;
cout << "The number of counters is: " << numOfCouns << endl;
cout << "The first counter is: " << counterNames[0] << endl;
cout << "The Exclusive value of: " << inFuncs[0]
<< " is: " << counterExclusiveValues[0][0] << endl;
cout << "The numOfSubRoutines of: " << inFuncs[0]
<< " is: " << numOfSubRoutines[0]
<< endl;
cout << "The Inclusive value of: " << inFuncs[1]
<< " is: " << counterInclusiveValues[1][0]
<< endl;
cout << "The numOfCalls of: " << inFuncs[1]
<< " is: " << numOfCalls[1]
<< endl;
cout << "@@@@@@@@@@@@@@@" << endl;
}
TAU_DB_DUMP_INCR();
SEE ALSO
TAU_GET_COUNTER_NAMES(3), TAU_GET_FUNC_NAMES(3), TAU_DUMP_FUNC_NAMES(3), TAU_DUMP_FUNC_VALS(3)
08/31/2005 TAU_GET_FUNC_VALS(3)