Sponsored Content
Full Discussion: ISO C++ ambiguous error
Operating Systems Linux Red Hat ISO C++ ambiguous error Post 302766283 by dany2704 on Monday 4th of February 2013 01:22:52 PM
Old 02-04-2013
ISO C++ Ambiguous error

Yes the string class has overloaded assignment operator function,thats why it throws an error .Is it possible to use g++ compiler option to deselect the in built function ,so that the user defined function can be used
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ambiguous redirect

i have following statement in the script echo -e "$str_XML_col_name:$str_field_type;" >> $i_DC_Key_$i_Tgt_DC_key_Schema here $i_DC_Key is DC key and $i_Tgt_DC_key are the variables............... when i ran the script i am getting error rec_merge.sh: $i_DC_Key_$i_Tgt_DC_key_Schema:... (1 Reply)
Discussion started by: mahabunta
1 Replies

2. Shell Programming and Scripting

getting Ambiguous error on kill -9 @pid from csh

Hello all i have simple script that executing program every 10 seconds im invoke this script as daemon with second script that put it in the background this is my first script (IsAliveTester.csh) #!/bin/csh -f @ iSleep = 10 set processName = "ClientTester" while(1) $processName ... (0 Replies)
Discussion started by: umen
0 Replies

3. Shell Programming and Scripting

`ls -l`: Ambiguous

Hi, I'm trying to code a simple script (c-shell) on a Solaris box and I'm getting an "Ambiguous" error. These are the lines that cause the error: On c-shell: > set var = "" > @ var = `ls -l` `ls -l`: Ambiguous However if I change the second line to: > set var = `ls -l` This works... (2 Replies)
Discussion started by: Guillermo Lopez
2 Replies

4. UNIX for Dummies Questions & Answers

Ambiguous and Command not found Error in UNIX

Hi,All I wrote below script(Example1.sh) and i ran but it giveing error. it's excuted yesterday. SYSTEM_TIME=`date '+%H:%M:%S'` CMP_LOG_TIME=`head -1 runcmp-HINET.log` CMP_ENDED1=`grep 'HINET CMP ended' runcmp-HINET.log` CMP_ENDED2=`echo "HINET CMP ended"` CMP_FAILED2=`echo "HINET... (2 Replies)
Discussion started by: koti_rama
2 Replies

5. Shell Programming and Scripting

Ambiguous and Command not found Error in UNIX

Hi,All I wrote below script(Example1.sh) and i ran but i got error. it's excuted yesterday. SYSTEM_TIME=`date '+%H:%M:%S'` CMP_LOG_TIME=`head -1 runcmp-HINET.log` CMP_ENDED1=`grep 'HINET CMP ended' runcmp-HINET.log` CMP_ENDED2=`echo "HINET CMP ended"` CMP_FAILED2=`echo "HINET CMP... (2 Replies)
Discussion started by: koti_rama
2 Replies

6. Shell Programming and Scripting

Ambiguous output redirect error

Hi everyone, While I was trying to do DATE=`date +"%Y%m%d_%H%M%S"` STARTLOG=$TUXSTDDIR/start_$DATE.log tmboot -y > $STARTLOG 2>&1 I got an error i.e. Ambiguous output redirect error. Here the first part is to boot the account so there is nothing wrong with that.... (6 Replies)
Discussion started by: pareshan
6 Replies

7. Shell Programming and Scripting

ambiguous redirect error

This script has ambiguous redirect error. ... cd $HOME cd folder/work # search all subfolders in work directory find -mindepth 1 -maxdepth 1 -type d | while read directory do CUR_FOLDER="${directory#"./"}" cd $CUR_FOLDER chmod 644 * for ff in *; do if ; then ... (5 Replies)
Discussion started by: candyme
5 Replies

8. Red Hat

How to make boot.iso image from rhel6 installation dvd iso ?

Hello Everyone, Can anyone let me know how to make minimal boot.iso from rhl6 installation dvd iso image. I have a dvd image with me but i want to make just a minimal boot media. Somehow it is not shipped with dvd iso. I know we can download boot.iso from redhat site but is there any anyway we... (5 Replies)
Discussion started by: Rohit Bhanot
5 Replies

9. Shell Programming and Scripting

Ambiguous error

Hello everybody, I just took over this job from someone else and in the past this script they built worked but i recently upgraded from openSuSe 11.4 to 12.1 Now when i run the script i get an ambiguous error at line 25 (the first line after add() ) I have edited out the webpath and any... (1 Reply)
Discussion started by: gumbicus
1 Replies

10. Linux

Ambiguous redirect error and syntax error when using on multiple files

Hi, I need help on following linux bash script. When I linux commands for loop or while loop on individual file it runs great. but now I want the script to run on N number of files so it gives me ambiguous redirect error on line 12 and syntax error on line 22 : (pls help ); #!/bin/bash #... (16 Replies)
Discussion started by: Madhusudan Das
16 Replies
binops(3bobcat) 						 Binary Operators						   binops(3bobcat)

NAME
binops - Template functions for class-type binary operators SYNOPSIS
#include <utility> #include <bobcat/typetrait> #include <bobcat/binops> DESCRIPTION
Classes can overload binary operators. A class named Class may overload these binary operators to suit its own needs, allowing, e.g., two Class type objects to be added after overloading operator+. Operators for the binary operators *, /, %, +, -, <<, >>, &, |, and ^ (in this man-page they are generically indicated as the `@' operator) can be overloaded by defining the operator@ function. If a class supports copy construction and if it offers binary assignment operators (i.e., it offers members of the form operator@=), then the matching binary operators can all be implemented identically. The move-aware Class &operator@(Class &&lhs, Class const &rhs) is easily implemented in terms of operator@= (note that the class itself doesn't have to be `move-aware' to define this function). The move-aware binary operator one requires a one line implementation, and as its implementation never changes it could safely be defined inline: Class operator@(Class &&lhs, Class const &rhs) { return std::move(lhs @= rhs); } The traditional binary operator can be implemented using its standard form: Class operator@(Class const &lhs, Class const &rhs) { Class tmp(lhs); tmp @= rhs; return tmp; } The implementation in bobcat/binops is slightly more complex as it allows from lhs or rhs promotions. As the binary operators can all be implemented alike their definitions are perfectly suited for templates: A class offering a particular operator@= then automatically also offers the matching binary operators after including bobcat/binops. Since the binary function templates are not instantiated until used their definitions can be processed by the compiler even if a class implements only a subset of the avail- able binary assignment operators. NAMESPACE
The binary operator functions templates in bobcat/binops are not implemented in a particular namespace. This allows sources to include bob- cat/binops in multiple namespaces. If bobcat/binops is to be used in multiple namespaces then the include safeguard (using the identifier INCLUDED_BOBCAT_BINOPS_) must be suppressed between inclusions of bobcat/binops in different namespaces. E.g., to make the binary operator function templates available in a source file using the namespace FBB and in a source file using the default namespace the following scheme can be used: #include <utility> // ensure std::move is available #include <bobcat/typetrait> // required by binops namespace MY_NAMESPACE { #include <bobcat/binops> // binary operators available in MY_NAMESPACE } #undef INCLUDED_BOBCAT_BINOPS_ // suppress the include guard #include <bobcat/binops> // read binops again so the binary // operators can be used in the // default namespace as well INHERITS FROM
- OVERLOADED OPERATORS
The function templates in bobcat/binops implement all arithmetic binary operators, both move-aware and the traditional binary operators, expecting constant lvalue references. They can be used if the matching binary assignment operators were implemented in the classes for which the templates must be instantiated. The following operators are available: Move-aware operators, using temporary objects for its left-hand side operands: o Class operator*(Class &&lhs, Class const &rhs): o Class operator/(Class &&lhs, Class const &rhs): o Class operator%(Class &&lhs, Class const &rhs): o Class operator+(Class &&lhs, Class const &rhs): o Class operator-(Class &&lhs, Class const &rhs): o Class operator<<(Class &&lhs, Class const &rhs): o Class operator>>(Class &&lhs, Class const &rhs): o Class operator&(Class &&lhs, Class const &rhs): o Class operator|(Class &&lhs, Class const &rhs): o Class operator^(Class &&lhs, Class const &rhs): `Traditional' operators, using lvalue references to constant objects for its left-hand side operands: o Class operator*(Class const &lhs, Class const &rhs): o Class operator/(Class const &lhs, Class const &rhs): o Class operator%(Class const &lhs, Class const &rhs): o Class operator+(Class const &lhs, Class const &rhs): o Class operator-(Class const &lhs, Class const &rhs): o Class operator<<(Class const &lhs, Class const &rhs): o Class operator>>(Class const &lhs, Class const &rhs): o Class operator&(Class const &lhs, Class const &rhs): o Class operator|(Class const &lhs, Class const &rhs): o Class operator^(Class const &lhs, Class const &rhs): The latter group of operators also support promotions. EXAMPLE
#include <iostream> #include <utility> #include "../../typetrait/typetrait" #include "../binops" class Demo { friend std::ostream &operator<<(std::ostream &out, Demo const &demo); int d_value; public: Demo(int value = 0) : d_value(value) {} Demo(Demo const &other) : d_value(other.d_value) { std::cout << "Demo CC called "; } Demo &operator+=(Demo const &rhs) { d_value += rhs.d_value; return *this; } }; std::ostream &operator<<(std::ostream &out, Demo const &demo) { return out << demo.d_value; } using namespace std; int main() { Demo four(4); Demo five(5); cout << four + five << ' ' << four + 5 << ' ' << 4 + five << ' '; } FILES
bobcat/binops - defines the binary operator function templates SEE ALSO
bobcat(7) BUGS
o The header files utility, defining std::move, and bobcat/typetrait are required by, but are not included by bobcat/binops. This was a design decision, see the NAMESPACE section. DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 binops(3bobcat)
All times are GMT -4. The time now is 11:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy