Sponsored Content
Top Forums Programming C++ operator overloading error Post 303026995 by milhan on Thursday 6th of December 2018 04:00:26 PM
Old 12-06-2018
Quote:
Originally Posted by Corona688
What type does your 'operator =' return?
Code:
void operator=(const myString& rside);

 

10 More Discussions You Might Find Interesting

1. AIX

xlC compilation error when dealing with operator overloading

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

unary operator expected error

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

C++ Optr Overloading

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

File already exists error while using '>' operator

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

Error : -ne: unary operator expected

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

Delete operator overloading with multiple arguments.

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

[: =: unary operator expected error

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

c++ assignment operator overloading

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

mysqld overloading cpu of VPS

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

Help - binary operator expected error

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
std::gslice_array< _Tp >(3cxx)											    std::gslice_array< _Tp >(3cxx)

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<typename _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 61 of file gslice_array.h. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 std::gslice_array< _Tp >(3cxx)
All times are GMT -4. The time now is 05:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy