freelanceprogrammers.org Forum Index » C
query..!
Joined: 02 Jan 2005
Posts: 9
query..!
Check this out...
Regards
Manik
--- Kaunal Gandhi <kaunalgandhi@...> wrote:
>
>
> Hello everybody,
>
> Can anybody tell me how we can use c with databases
> like how to
> connect c with oracle?
> my id is kaunalgandhi@...
> if u can then please let me know
>
> Regards,
> kaunal gandhi
>
>
>
>
>
>
>
__________________________________
Do you Yahoo!?
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com
Joined: 15 Jan 2005
Posts: 1
query..!
dear friends
could u tell the the following?
//Stock is a class//
Stock Stock1;
stock Stock2=Stock1;
the first stament is a initialization.but what is
about the 2nd statement? is it initialization or
assignment?
regards
satyaranjan giri
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
Joined: 04 Jan 2005
Posts: 2
query..!
Hi
In the second statement you r copying stock1 object into stock2 ie stock1
properties into stock2.
Thanks & Regards
Mayank
>From: satyaranjan giri <sat_21_g@...>
>Reply-To: Programmers-Town@yahoogroups.com
>To: Programmers-Town@yahoogroups.com
>Subject: (PT) is it initialization or assignment?
>Date: Sat, 15 Jan 2005 01:18:56 -0800 (PST)
>
>
>
>dear friends
>
>could u tell the the following?
>
>//Stock is a class//
>
>Stock Stock1;
>
>stock Stock2=Stock1;
>
>the first stament is a initialization.but what is
>about the 2nd statement? is it initialization or
>assignment?
>
>regards
>
>satyaranjan giri
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail - Find what you need with new enhanced search.
>http://info.mail.yahoo.com/mail_250
>
>
>
_________________________________________________________________
MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal
haven online.
Joined: 17 Jan 2005
Posts: 1
query..!
in my view it is an assignment bcos all the data
members of the stock 1 object can be referred by
stock2 stock1 and stock2 point to the same data
variables
--- satyaranjan giri <sat_21_g@...> wrote:
>
>
> dear friends
>
> could u tell the the following?
>
> //Stock is a class//
>
> Stock Stock1;
>
> stock Stock2=Stock1;
>
> the first stament is a initialization.but what is
> about the 2nd statement? is it initialization or
> assignment?
>
> regards
>
> satyaranjan giri
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced
> search.
> http://info.mail.yahoo.com/mail_250
>
>
>
>
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
Joined: 04 Jan 2005
Posts: 2
query..!
Hi,
The second staement is also initialization. Here your are initializing stock2 with the properties of stock1. Hence, here copy constructor will be called to initialize stock2.
Hope, this will solve your problem.
bye,
Lalit----- Original Message -----From: "Mayank Khare" To: Programmers-Town@yahoogroups.comSubject: RE: (PT) is it initialization or assignment?Date: Sun, 16 Jan 2005 20:29:12 +0530Hi In the second statement you r copying stock1 object into stock2 ie stock1 properties into stock2.Thanks & RegardsMayank>From: satyaranjan giri <sat_21_g@...>>Reply-To: Programmers-Town@yahoogroups.com>To: Programmers-Town@yahoogroups.com>Subject: (PT) is it initialization or assignment?>Date: Sat, 15 Jan 2005 01:18:56 -0800 (PST)>>>>dear friends>>could u tell the the following?>>//Stock is a class//>>Stock Stock1;>>stock Stock2=Stock1;>>the first stament is a initialization.but what is>about the 2nd statement? is it initialization or>assignment?>>regards>>satyaranjan giri>>>>__________________________________>Do you Yahoo!?>Yahoo! Mail - Find what you need with new enhanced search.>http://info.mail.yahoo.com/mail_250>>>_________________________________________________________________MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.To unsubscribe : programmers-town-unsubscribe@yahoogroups.com
Lalit Kumar
Software Engineer
GIST R & D
C-DAC, University Campus
Ganeshkhind, Pune- 411007
Phone: 020- 25694000 Ext.- 262
Direct : 020- 25694091
Visit us at: http://www.cdacindia.com/gist
I cannot give you the formula for success, but I can give you the formula for failure--which is: Try to please everybody. [ Herbert B. Swop]
-- -
Free Email at http://www.MailPuppy.com
- Fraud Warning: Never accept foreign checks/money orders
Powered by Outblaze
Joined: 17 Jan 2005
Posts: 2
query..!
Mayank Khare <mayank_khare@...> wrote:
Hi In the second statement you r copying stock1 object into stock2 ie stock1 properties into stock2.Thanks & RegardsMayank>From: satyaranjan giri <sat_21_g@...>>Reply-To: Programmers-Town@yahoogroups.com>To: Programmers-Town@yahoogroups.com>Subject: (PT) is it initialization or assignment?>Date: Sat, 15 Jan 2005 01:18:56 -0800 (PST)>>>>dear friends>>could u tell the the following?>>//Stock is a class//>>Stock Stock1;>>stock Stock2=Stock1;>>the first stament is a initialization.but what is>about the 2nd statement? is it initialization or>assignment?>>regards>>satyaranjan giri>>>>__________________________________>Do you
Yahoo!?>Yahoo! Mail - Find what you need with new enhanced search.>http://info.mail.yahoo.com/mail_250>>>_________________________________________________________________MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.To unsubscribe : programmers-town-unsubscribe@yahoogroups.comHi dear
In the second statement ur initializing the value of object 2 in object 1, Still not very pvaguely u can call it assigning or initializing but in this case these terms can be used interchangeably as this is the special feature of c++
Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone.
Joined: 17 Jan 2005
Posts: 1
query..!
What is the output of the following program..
#include <stdio.h>
class stack{public: stack(); int a; int b();};
stack::stack(){ printf("Aaaa");}
int stack::b(){ a+=10; printf("%d",a); return(0);}
void main(){ stack s1; s1.a=0; s1.b(); stack s2=s1; s2.b();}bhuwanesh sundriyal <er_bhuwanesh2005@...> wrote:
Mayank Khare <mayank_khare@...> wrote: Hi In the second statement you r copying stock1 object into stock2 ie stock1 properties into stock2.Thanks & RegardsMayank>From: satyaranjan giri <sat_21_g@...>>Reply-To: Programmers-Town@yahoogroups.com>To: Programmers-Town@yahoogroups.com>Subject: (PT) is it initialization or assignment?>Date: Sat, 15 Jan 2005 01:18:56 -0800 (PST)>>>>dear friends>>could u tell the the following?>>//Stock is a class//>>Stock Stock1;>>stock Stock2=Stock1;>>the first stament is a initialization.but what is>about the 2nd statement? is it initialization or>assignment?>>regards>>satyaranjan giri>>>>__________________________________>Do you
Yahoo!?>Yahoo! Mail - Find what you need with new enhanced search.>http://info.mail.yahoo.com/mail_250>>>_________________________________________________________________MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.To unsubscribe : programmers-town-unsubscribe@yahoogroups.comHi dear
In the second statement ur initializing the value of object 2 in object 1, Still not very pvaguely u can call it assigning or initializing but in this case these terms can be used interchangeably as this is the special feature of c++
Do you Yahoo!?Take Yahoo! Mail with you! Get it on your mobile phone. To unsubscribe : programmers-town-unsubscribe@yahoogroups.com
Yahoo! India Matrimony: Find your life partner
online.
Joined: 29 Dec 2004
Posts: 31
query..!
From: satyaranjan giri [mailto:sat_21_g@...]
>dear friends
>
>could u tell the the following?
>
>//Stock is a class//
>
>Stock Stock1;
>
>stock Stock2=Stock1;
>
>the first stament is a initialization.but what is
>about the 2nd statement? is it initialization or
>assignment?
(Incorrect capitalisation aside..) while it looks like assignment, it is
in fact using one of the constructors (what you`ve call initialization):
$ cat cpp.cpp
#include <iostream>
using std::cout;
class foo{
public:
foo(){ cout << "foo::foo()
"; } // default ctor
foo(const foo& f){ cout << "foo::foo(const foo&)
"; } // copy
ctor
void operator=(foo& f){ cout << "foo:operator=()
";}
};
int main(){
cout << "Declaring g:
";
foo g;
cout << "Declaring h in terms of g:
";
foo h = g;
cout << "Assigning h to g:
";
g = h;
}
$ cpp
Declaring g:
foo::foo()
Declaring h in terms of g:
foo::foo(const foo&)
Assigning h to g:
foo:operator=()
$
--
PJH
The simple man`s approach to exception handling is to put a try-catch
around the whole application and just restart the application on error.
That`s what Microsoft does anyway.
- Thomas Hruska sums up MS in C-Prog
Alderley plc, Arnolds Field Estate, The Downs, Wickwar, Gloucestershire, GL12
8JD, UK
Tel: +44(0)1454 294556 Fax: +44 (0)1454 299272
Website : www.alderley.com Sales : sales@... Service :
service@...
This email and its contents are confidential and are solely for the use of the
intended recipient. If you are not the original recipient you have received it
in error and any use, dissemination, forwarding, printing or copying of this
email is strictly prohibited. Should you receive this email in error please
immediately notify it@...
This email has been scanned for viruses, however you should always scan emails
with your own systems prior to opening.
Joined: 18 Jan 2005
Posts: 1
query..!
Is the second both initialization and an
assignment since we give it a specific value???
Cheers,
Tej
-----Original
Message-----
From: Lalit kumar
[mailto:lalit4u@...]
Sent: Monday, 17 January 2005 3:35
PM
To:
Programmers-Town@yahoogroups.com
Subject: RE: (PT) is it
initialization or assignment?
Hi,
The second staement is also initialization. Here your
are initializing stock2 with the properties of stock1. Hence, here copy
constructor will be called to initialize stock2.
Hope, this will solve your problem.
bye,
Lalit
----- Original Message -----
From: "Mayank Khare"
To: Programmers-Town@yahoogroups.com
Subject: RE: (PT) is it initialization or assignment?
Date: Sun, 16 Jan 2005 20:29:12 +0530
Hi
In the second statement you r copying
stock1 object into stock2 ie stock1
properties into stock2.
Thanks & Regards
Mayank
>From: satyaranjan giri <sat_21_g@...>
>Reply-To: Programmers-Town@yahoogroups.com
>To: Programmers-Town@yahoogroups.com
>Subject: (PT) is it initialization or
assignment?
>Date: Sat, 15 Jan 2005 01:18:56 -0800 (PST)
>
>
>
>dear friends
>
>could u tell the the following?
>
>//Stock is a class//
>
>Stock Stock1;
>
>stock Stock2=Stock1;
>
>the first stament is a initialization.but what
is
>about the 2nd statement? is it initialization
or
>assignment?
>
>regards
>
>satyaranjan giri
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail - Find what you need with new
enhanced search.
>http://info.mail.yahoo.com/mail_250
>
>
>
_________________________________________________________________
MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your
personal
haven online.
To
unsubscribe : programmers-town-unsubscribe@yahoogroups.com
Lalit KumarSoftware EngineerGIST R & DC-DAC, University CampusGaneshkhind, Pune- 411007Phone: 020- 25694000 Ext.- 262Direct : 020- 25694091Visit us at: http://www.cdacindia.com/gist I cannot give you the formula for success, but I can give you the formula for failure--which is: Try to please everybody. [ Herbert B. Swop]
-- -
Free Email at http://www.MailPuppy.com
- Fraud Warning: Never accept foreign checks/money orders Powered by Outblaze
To
unsubscribe : programmers-town-unsubscribe@yahoogroups.com
Joined: 18 Jan 2005
Posts: 2
query..!
Hi,
stock Stock2=Stock1;
// is an initialization...copy constructor is called here for
initialization...if ur program doesn`t has a copy constructor
implementation then default copy constructor is called.
whereas
stock Stock2;
Stock2=Stock1;
// is an assignment......operator= function is called here.....if ur
program doesn`t has a operator= function implementation then default
operator= function is called.
Cheers,
Sheetal
On Sat, 15 Jan 2005 01:18:56 -0800 (PST), satyaranjan giri
<sat_21_g@...> wrote:
>
>
> dear friends
>
> could u tell the the following?
>
> //Stock is a class//
>
> Stock Stock1;
>
> stock Stock2=Stock1;
>
> the first stament is a initialization.but what is
> about the 2nd statement? is it initialization or
> assignment?
>
> regards
>
> satyaranjan giri
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search.
> http://info.mail.yahoo.com/mail_250
>
> To unsubscribe : programmers-town-unsubscribe@yahoogroups.com
>
>
> Yahoo! Groups Links
>
>
>
>
>
Joined: 18 Jan 2005
Posts: 2
query..!
Hi,
stock Stock2=Stock1;
// is an initialization...copy constructor is called here for
initialization...if ur program doesn`t has a copy constructor
implementation then default copy constructor is called.
whereas
stock Stock2;
Stock2=Stock1;
// is an assignment......operator= function is called here.....if ur
program doesn`t has a operator= function implementation then default
operator= function is called.
Cheers,
Sheetal
On Sat, 15 Jan 2005 01:18:56 -0800 (PST), satyaranjan giri
<sat_21_g@...> wrote:
>
>
> dear friends
>
> could u tell the the following?
>
> //Stock is a class//
>
> Stock Stock1;
>
> stock Stock2=Stock1;
>
> the first stament is a initialization.but what is
> about the 2nd statement? is it initialization or
> assignment?
>
> regards
>
> satyaranjan giri
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search.
> http://info.mail.yahoo.com/mail_250
>
> To unsubscribe : programmers-town-unsubscribe@yahoogroups.com
>
>
> Yahoo! Groups Links
>
>
>
>
>
Joined: 25 Jul 2003
Posts: 48
query..!
Reply embedded...
> -----Original Message-----
> From: satyaranjan giri [mailto:sat_21_g@...]
> Sent: Saturday, January 15, 2005 3:19 AM
> To: Programmers-Town@yahoogroups.com
> Subject: (PT) is it initialization or assignment?
>
>
>
>
> dear friends
>
> could u tell the the following?
>
> //Stock is a class//
>
> Stock Stock1;
Constructing a `Stock` object.
The default constructor Stock::Stock() will be invoked.
> stock Stock2=Stock1;
^^^^^
Should be `Stock`.
> the first stament is a initialization.but what is
> about the 2nd statement? is it initialization or
> assignment?
Copy-Constructing `Stock2` from `Stock1`.
The copy-constructor Stock::Stock(const Stock& rhs) will be invoked.
This is essentially the same as:
Stock Stock2(Stock1);
HTH
Shyan
Joined: 19 Jan 2005
Posts: 3
query..!
On Sat, 15 Jan 2005 01:18:56 -0800 (PST), satyaranjan giri
<sat_21_g@...> wrote:
>
>
> dear friends
>
> could u tell the the following?
>
> //Stock is a class//
>
> Stock Stock1;
>
> stock Stock2=Stock1;
>
> the first stament is a initialization.but what is
> about the 2nd statement? is it initialization or
> assignment?
>
> regards
>
> satyaranjan giri
Infact both are the type of initialization.
It is the matter of custructor overloading.
cheers..
Niraj
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







