hi,
I defined my own String class and overloaded the output operator with
which works fine. Until I try to execute the following statement:
And, I get error
The above code works fine when I change the concatenation statement as follows:
What did I miss?
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
ost_date
ost::Date(3) Library Functions Manual ost::Date(3)NAME
ost::Date -
The Date class uses a julian date representation of the current year, month, and day.
SYNOPSIS
#include <numbers.h>
Inherited by ost::DateNumber, and ost::Datetime.
Public Member Functions
Date (time_t tm)
Date (tm *dt)
Date (char *str, size_t size=0)
Date (int year, unsigned month, unsigned day)
Date ()
virtual ~Date ()
int getYear (void) const
unsigned getMonth (void) const
unsigned getDay (void) const
unsigned getDayOfWeek (void) const
char * getDate (char *buffer) const
time_t getDate (void) const
time_t getDate (tm *buf) const
long getValue (void) const
void setDate (const char *str, size_t size=0)
bool isValid (void) const
operator long () const
String operator() () const
Date & operator++ ()
Date & operator-- ()
Date & operator+= (const long val)
Date & operator-= (const long val)
int operator== (const Date &date)
int operator!= (const Date &date)
int operator< (const Date &date)
int operator<= (const Date &date)
int operator> (const Date &date)
int operator>= (const Date &date)
bool operator! () const
Protected Member Functions
void toJulian (long year, long month, long day)
void fromJulian (char *buf) const
virtual void update (void)
A method to use to 'post' any changed values when shadowing a mixed object class.
Protected Attributes
long julian
Friends
Date operator+ (const Date &date, const long val)
Date operator- (const Date &date, const long val)
Date operator+ (const long val, const Date &date)
Date operator- (const long val, const Date &date)
Detailed Description
The Date class uses a julian date representation of the current year, month, and day.
This is then manipulated in several forms and may be exported as needed.
Author:
David Sugar dyfet@ostel.com julian number based date class.
Constructor & Destructor Documentation
ost::Date::Date (time_ttm)
ost::Date::Date (tm *dt)
ost::Date::Date (char *str, size_tsize = 0)
ost::Date::Date (intyear, unsignedmonth, unsignedday)
ost::Date::Date ()
virtual ost::Date::~Date () [virtual]
Member Function Documentation
void ost::Date::fromJulian (char *buf) const [protected]
char* ost::Date::getDate (char *buffer) const
time_t ost::Date::getDate (void) const
time_t ost::Date::getDate (tm *buf) const
unsigned ost::Date::getDay (void) const
unsigned ost::Date::getDayOfWeek (void) const
unsigned ost::Date::getMonth (void) const
long ost::Date::getValue (void) const
int ost::Date::getYear (void) const
bool ost::Date::isValid (void) const
Reimplemented in ost::Datetime.
ost::Date::operator long () const [inline]
bool ost::Date::operator! (void) const [inline]
Reimplemented in ost::Datetime.
int ost::Date::operator!= (const Date &date)
String ost::Date::operator() () const
Date& ost::Date::operator++ ()
Date& ost::Date::operator+= (const longval)
Date& ost::Date::operator-- ()
Date& ost::Date::operator-= (const longval)
int ost::Date::operator< (const Date &date)
int ost::Date::operator<= (const Date &date)
int ost::Date::operator== (const Date &date)
int ost::Date::operator> (const Date &date)
int ost::Date::operator>= (const Date &date)
void ost::Date::setDate (const char *str, size_tsize = 0)
void ost::Date::toJulian (longyear, longmonth, longday) [protected]
virtual void ost::Date::update (void) [protected], [virtual]
A method to use to 'post' any changed values when shadowing a mixed object class. This is used by DateNumber.
Reimplemented in ost::DateNumber.
Friends And Related Function Documentation
Date operator+ (const Date &date, const longval) [friend]
Date operator+ (const longval, const Date &date) [friend]
Date operator- (const Date &date, const longval) [friend]
Date operator- (const longval, const Date &date) [friend]
Member Data Documentation
long ost::Date::julian [protected]
Author
Generated automatically by Doxygen for GNU CommonC++ from the source code.
GNU CommonC++ Sat Jun 23 2012 ost::Date(3)