473,324 Members | 2,248 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,324 software developers and data experts.

Expected unqualified-id before '->' token

Why it happen and how to fix this error?
Attached Images
File Type: png queue.png (11.5 KB, 5213 views)
Oct 21 '16 #1
1 4591
weaknessforcats
9,208 Expert Mod 8TB
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

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

Similar topics

2
by: nitin | last post by:
HI I am getting the following error while trying to compile my program /usr/include/c++/3.2.2/bits/stringfwd.h:48: parse error before `>' token namespace std 47 { 48 template<typename...
9
by: Peter Ammon | last post by:
As we know, due to C++'s "longest match" rule, the >> token causes headaches when working with nested templates, e.g. vector<vector<int>> will not parse correctly without inserting a space...
5
by: Damien | last post by:
Hi all, I'm using a pretty standard C++ Singleton class, as below: template <typename T> class Singleton { public: static T* Instance() {
7
by: Warrax | last post by:
I am currently doing online tutorials for C++, and am pretty much stuck in a rut about this problem. It is saying that there's an expected unqualifed-id before '{' token (I will post the code in just...
10
by: preeya | last post by:
Hi, I have written the following program: ------------------------------------------------------------------------------------------------------------- 1 #include <stdio.h> 2 #include...
5
by: nina01 | last post by:
Hi! I'm working on a mini compiler with flex and bison. The ".l" and ".y" files are generated successfully. However, when I try to compile the hole thing using the command "gcc -o comp comp.tab.c...
9
by: erictheone | last post by:
Ok so what I'm trying to do is create a trans location cipher. For those among us that don't know alot about cryptography it is a method for jumbling up letters to disguise linguistic...
4
by: KBeggs | last post by:
Hi. I'm working on a program for a class that requires me to make a checking account simulator. However, every time I try to compile it, I get errors. I have gotten it down to very minimal errors,...
2
by: Smarta | last post by:
void print_massive(int(*data) { int main; it is that very { right there that is causing the entire program to not compile. It does have another bracket at the end of the void function. I am...
1
by: Jeevan83 | last post by:
Hi, I gott his error after compiling. I could not find the error, whats the error please? error: error: expected expression before ‘{’ token item={"rice",10,40,30}; #include<stdio.h>...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.