473,394 Members | 1,770 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,394 software developers and data experts.

what is an" uniqualifed-id before "{"token message referring to

2
i continually experience an "expected uqualified-id before "{" token. All the answers so far have suggested "work arounds"but don't say what an uqualified-id actually is.

I really don't want an alternative code , but a description of what an unqualified-id actually is
Here is a part of the code
Expand|Select|Wrap|Line Numbers
  1.  #include <iostream>
  2.  #included <string>
  3.  int main()
  4.  
  5. { // here I start the function, but the error message is for line 3.
Jun 18 '19 #1

✓ answered by dev7060

A qualified name refers to a class member, namespace member or enumerator. It appears to the right hand side of the scope resolution operator. It has some sort of indication where it belongs. e.g. cout and endl when used with scope resolution operator (std::cout). 'std' is the name of the namespace that identifier cout is part of.

An unqualified name, on the other hand, doesn't live in any namespace and doesn't need a qualification. e.g. built-in types like int, double etc. You don't use scope resolution operator with them.

According to the part of code you have shown, looks like the pre-processing directive 'include' is misspelled. And hence, compiler couldn't identify that and expects a correct unqualified-id before "{".

1 4205
dev7060
636 Expert 512MB
A qualified name refers to a class member, namespace member or enumerator. It appears to the right hand side of the scope resolution operator. It has some sort of indication where it belongs. e.g. cout and endl when used with scope resolution operator (std::cout). 'std' is the name of the namespace that identifier cout is part of.

An unqualified name, on the other hand, doesn't live in any namespace and doesn't need a qualification. e.g. built-in types like int, double etc. You don't use scope resolution operator with them.

According to the part of code you have shown, looks like the pre-processing directive 'include' is misspelled. And hence, compiler couldn't identify that and expects a correct unqualified-id before "{".
Jun 18 '19 #2

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

Similar topics

1
by: Arun Wadhawan | last post by:
whatisthe meenign of this error message in general ? String or binary data would be truncated. Kind regards Arun
4
by: Bhavna | last post by:
Hello Does anyone know what this message could be regarding? The application seems to fall over on the following line. Dim variable1 As SqlString = Arraylist1(i The first time the code runs...
3
by: Frustrated Developer via DotNetMonster.com | last post by:
I have developed a form that would allow the user to load and search a database several ways, by data range, by specific number or all database entries. I can successfully load any of the ways...
0
by: UJ | last post by:
I'm trying to do some remoting and I'm getting the following error when I register a callback function: 'Type System.DelegateSerializationHolder and the types derived from it (such as...
7
by: Brian Shafer | last post by:
I have VS2005 installed on my destop and on my laptop. I created this app with my desktop and i don't get this. Run the IDE on my laptop and this is what I get? Access of shared member, constant...
2
by: ayman723 | last post by:
hi; I have this code in my book and when I copied it into my compiler into two files, one is header and the other is .cpp. it gives me an error, I'm sure I copied it right but can't figure out the...
4
by: giannis | last post by:
I am a newbie at VB. When i try to remove an item from the BindingSource and try to delete this item from the database: BindingSource.RemoveCurrent() ...
3
by: hakim2 | last post by:
Fatal error: main() : Failed opening required 'Connections/gnc.php' (include_path='.:/usr/local/lib/php') in / homepages/htdocs/temp2/online/webcontrol/index.php on line 1
5
by: ab12 | last post by:
I'm trying to compile a program in C and i get this error i've never seen before. When i click on the error it just highlights the last brace of my program. the compiler i'm using is lcc-win32
5
AAPWM
by: AAPWM | last post by:
Hello My job is to extract data from my companies database with Crystal Reports, export that data to Excel, modify the data, save the data as "Text "tab delimited"", and upload to the database...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.