473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

question of operator '->' precedence

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?

Mar 19 '06 #1
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)
Mar 19 '06 #2
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.
Mar 19 '06 #3

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.

Mar 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
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?
5
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,...
2
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...
5
by: Riku Jarvinen | last post by:
Hi everyone, I asked another question regarding this same subject about a week ago. See thread: ...
2
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...
15
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...
10
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 {
2
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 {...
16
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...
8
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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...
0
Oralloy
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,...
0
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.