Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c = c++ problem
- From: ryanxpx@xxxxxxxxxx (Pat Ryan)
- Subject: c = c++ problem
- Date: Fri, 31 Mar 2000 08:15:29 -0500
I saw the other responses, and while they are correct, I agree with Rajesh,
after the assignment, just what is being incremented? It would appear to
be the variable c.
However, the result you are seeing would indicate that the right hand side
of the assignment is a copy of c.
-Patrick.
"Rajesh Gupta" <rajesh_gu@xxxxxxxxxxx> on 03/31/2000 03:14:08 AM
To: advanced-java@xxxxxxxxxxxxxxxx
cc:
Subject: c = c++ problem
hello all
i have a simple problem
int c = 10;
c = c++;
and c is still 10 !
if use c = ++c; this gives me 11 this is quite obvious.
whats the logic behind c = c++ giving original value of c this ?
thanks in advance
Rajesh
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
Patrick H. Ryan
Senior Design Engineer
Hobart Technology Center
---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
- Prev by Date: Corba Security Services
- Next by Date: c = c++ problem
- Previous by thread: c = c++ problem
- Next by thread: c = c++ problem
- Index(es):