By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,985 Members | 1,712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,985 IT Pros & Developers. It's quick & easy.

Expected unqualified-id before '->' token

P: 1
Why it happen and how to fix this error?
Attached Images
File Type: png queue.png (11.5 KB, 1198 views)
Oct 21 '16 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
You need to use the operators on an object and not just a type.

Expand|Select|Wrap|Line Numbers
  1. void func(Q)
  2. {
  3.    Q.front =0;   <<<wrong. Q is not an object
  4. }
Expand|Select|Wrap|Line Numbers
  1. void func(Q obj)
  2. {
  3.    obj.front =0;   <<<correct. obj an object
  4. }
Oct 21 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.