On Koenig and Moo's 'Accelerated C++' p32, there is a table of operator
precedence, the first group (highest precedence) has x.y, x[y], x++,
x--. I don't see '->' here nor in the table. I believe 'x->y' has the
same precedence as x.y and x[y]. Is my guess correct? 3 1945
Fei Liu <fe*****@gmail.com> wrote: On Koenig and Moo's 'Accelerated C++' p32, there is a table of operator precedence, the first group (highest precedence) has x.y, x[y], x++, x--. I don't see '->' here nor in the table. I believe 'x->y' has the same precedence as x.y and x[y]. Is my guess correct?
Yes, I would say so too.
hth
--
jb
(reply address in rot13, unscramble first)
In article <11*********************@i39g2000cwa.googlegroups. com>,
"Fei Liu" <fe*****@gmail.com> wrote: On Koenig and Moo's 'Accelerated C++' p32, there is a table of operator precedence, the first group (highest precedence) has x.y, x[y], x++, x--. I don't see '->' here nor in the table. I believe 'x->y' has the same precedence as x.y and x[y]. Is my guess correct?
<http://www.cppreference.com/operator_precedence.html>
--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Daniel T. wrote: In article <11*********************@i39g2000cwa.googlegroups. com>, "Fei Liu" <fe*****@gmail.com> wrote:
On Koenig and Moo's 'Accelerated C++' p32, there is a table of operator precedence, the first group (highest precedence) has x.y, x[y], x++, x--. I don't see '->' here nor in the table. I believe 'x->y' has the same precedence as x.y and x[y]. Is my guess correct?
<http://www.cppreference.com/operator_precedence.html>
awesome, exactly what I need! Thanks, Daniel. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: billnospam |
last post by:
Is it possible to overload operators in vb.net?
Is it possible to do programmer defined boxing on byvalue
variables in vb.net?
|
by: Gonçalo Rodrigues |
last post by:
Hi all,
Sorry to bother you guys again with a template question but I'm really
trying to understand them and there's some piece of info that I'm
missing. I'm sure I'm being really dumb here so,...
|
by: grahamo |
last post by:
Hi,
I realise that c++ knows nothing about threads however my question is
related to an (excellent) article I was reading about threads and C++.
For all intents and purposes we can forget the...
|
by: Riku Jarvinen |
last post by:
Hi everyone,
I asked another question regarding this same subject about a week ago. See
thread:
...
|
by: Harry |
last post by:
Hi all,
I am writing a logger program which can take any datatype.
namespace recordLog {
enum Debug_Level {low, midium, high};
class L {
std::ofstream os;
Debug_Level cdl;
const...
|
by: Jeroen |
last post by:
Hi all,
I've got a very specific question about the evaluation order in C++.
Assume some kind of custom array class, with an overloaded subscript
operator. In the following code:
{
my_array...
|
by: Jeroen |
last post by:
Hi guys,
Just another question. Suppose I have 2 classes (incomplete code):
class A {
A(const B& b);
A& operator = (const A& a);
};
class B {
|
by: sven.bauer |
last post by:
Hi,
I have a question following up the following slightly older posting:
http://groups.google.de/group/comp.lang.c++/browse_thread/thread/40e52371e89806ae/52a3a6551f84d38b
class Base
{...
|
by: Juha Nieminen |
last post by:
I'm actually not sure about this one: Does the standard guarantee
that if there's at least one element in the data container, then
"--container.end()" will work and give an iterator to the last...
|
by: indrawati.yahya |
last post by:
In a recent job interview, the interviewer asked me how I'd design
classes for the following problem: let's consider a hypothetical
firewall, which filters network packets by either IP address,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |