473,786 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unqualified id before token '{' what is wrong to my code?

1 New Member
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include<iomanip>
  3.  
  4. {
  5.     int []unique count = 0;
  6.     int count = 0;
  7.     int []numbers = new int[20];
  8.     int [] uniquenumbers = new int [20];
  9.     console.writeline("enter 20 numbers:");
  10.     for (int i=0; i<numbers.length; i++)
  11. }
  12.  
  13. {
  14.  
  15.    try
  16.     {
  17.         console.readline(numbers[i);
  18.     }
  19.     catch
  20.     {
  21.         console.writeline ("invalid input!")
  22.         i--;
  23.     }
  24. }
  25. console.writeline("the unique numbers you entered are:");
  26. for(int i=0; i<numbers.length; i++)
  27. {
  28.       for(int j=0; j<uniquenumbers.length; j++)
  29. }
  30.   if(numbers[i]==uniquenumbers[j])
  31.     {
  32.         count ++;
  33.     }
  34. }
  35. if (count==0)
  36. {
  37.     uniquenumbers[unique count]=numbers[i];
  38.     console.writeline(numbers[i]);
  39.     uniquecount ++;
  40. }
  41. count=0;
  42. }
Jun 20 '12 #1
1 2254
Aimee Bailey
197 Recognized Expert New Member
oh dear there is quite a lot wrong with this, are you following a tutorial or book?

Aimee
Jun 20 '12 #2

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

Similar topics

2
1988
by: Wally Sanford | last post by:
http://wallysanford.com is currently being redirected by Namecheap to my server at home. The link to the W3C Validator has been working fine. Suddenly, that link causes the Validator to see and properly reject the following code, apparently some redirection plumbing that's not supposed to show: 1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2: <HTML> 3: ...
7
5700
by: Jerry Krinock | last post by:
I've declared a class that has some std::vector data members like this: class MyClass { public: ... std::vector<Apples> apples ; ... private: ...
14
6327
by: Simon Morgan | last post by:
I'm trying to write a function to parse a Reverse Polish Notation string from stdin and return 1 token at a time. For those of you who are unaware an RPN string looks like this: 1 2 + 4 * 3 + With each number being read and pushed onto a stack and, when an operator is encountered, each number on the stack is popped off and calculated using that operator and the result pushed onto the stack.
3
2089
by: Jeff Cooper | last post by:
Hey Folks, I have a bunch of aspx pages in a solution. One of these pages, call it header1.aspx, has it's code behind in header1.aspx.vb. Another, header2.aspx, has header2.aspx.vb. When I double-click a web control on header1.aspx, it brings me to the code behind for header2! In fact, the code behind page header1.aspx.vb doesn't even recognize the controls on page header1.aspx. BUT, header2.aspx.vb recognizes the controls from...
6
2741
by: Alvaro G. Vicario | last post by:
The code below inserts a <spantag around the image. It works fine in Firefox or Opera, but has a weird effect in Internet Explorer: browser keeps loading the image forever... Even though the picture *is* displayed, status bar and throbber won't stop showing activity. Apart from that, scripts work even in IE. Is it an IE bug or is there something wrong with my code? I've googled about it but couldn't find the right keywords... The...
14
2561
by: OldBirdman | last post by:
I have 2 ListBoxes, ColumnCount=1 with lbxAlpha1.RowSource = "A";"C";"E"; . . . and lbxAlpha2.RowSource = "B";"D";"F"; . . . All works fine as long as I only use one of the ListBoxes. When I have used one, and click the other, I get run-time error '94', and the value for the ListBox is Null. The error occurs at the Call NewLetter() for the WRONG ListBox (See Code Below). I have skipped the Call statement and with 'Step Into'...
2
1264
by: brof777 | last post by:
here is the code: DWORD SomeFunction(DWORD Dw_0, DWORD Dw_1, DWORD Dw_2) { return Dw_0 + Dw_1 + Dw_2; } void main() { DWORD Dw = 0; DWORD pDw = {1,2,3}; DWORD Dw_Sum = SomeFunction(pDw, pDw, pDw);
8
2453
by: =?GB2312?B?yum09MXt?= | last post by:
today I forgot to include some header,then I found the error message by the compiler is quite strange. so I want to know exactly the inner details of the compiler impletation,if possible. and I want to know what does the standard say about this situation. here is the code just to demonstrate the error.
3
2221
by: canabatz | last post by:
im using paging on this query: i got this code that returning wrong results: (SELECT bid_price, count(*) as n from bidding_details where bid_id=$bid_id GROUP BY bid_price DESC HAVING n = 1 ) UNION ALL (SELECT bid_price, count(*) as d from bidding_details where bid_id=$bid_id GROUP BY bid_price DESC HAVING d > 1) limit $eu, $limit "; the limit is working only on the first query ,the second query is running after the first limit ,so...
5
3715
by: mahmoodn | last post by:
I have a program which uses boost 1.33.1 and it works fine with gcc 4.1 however now that I want to compile with gcc 4.4 it get many errors. For example somewhere in the boost files, it says: /opt/boost_1_33_1/boost/mpl/aux_/numeric_op.hpp:250: error: expected unqualified-id before ‘:’ token the code at that line is (note the second line): #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) : AUX778076_OP_IMPL_NAME< typename...
0
9650
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.