Solved

100+ errors

Posted on 1998-09-05
3
190 Views
Last Modified: 2010-04-02
Hi all experts,

I am having problems with some code.  When it is compiled, it gives me over 100 errors (102 to be exact, after that point it says the compiler has exceeded the maximum limit).

I have been laboring over it for over an hour.  In the past, whenever this has happened, it was something simple.

Here is the code:
DWORD numwords = 0;
  CWaitCursor cur;

  UpdateData (TRUE);

  m_Results = "";

  switch (m_SearchType)
  { case (0): // Ascii
             numwords = m_Dict->SearchAscii (m_Results, m_Search1);
             break;

    case (1): // alphabet, a = 1, b = 2 etc
              numwords = m_Dict->SearchAlpha (m_Results, m_Search1);
              break;

    case (2): // Anagrams, i.e. cat = act
              numwords = m_Dict->SearchAnagrams (m_Results, m_Search2);
              break;

    case (3): // Palindromes, i.e. madam
              numwords = m_Dict->SearchPalindromes (m_Results, m_Search1);
              break;

    case (4): // Regular
              numwords = m_Dict->SearchRegular (m_Results, m_Search2);
              break;

    case (5): // Duplicates
              numwords = m_Dict->SearchDuplicates (m_Results, m_Search1);
              break;

    case (6): // Percentage thare are at least x percent vowels
              numwords = m_Dict->SearchPercentage (m_Results, "aeiouy", m_Search1);
              break;

    case (7): // Percentage thare are at least x percent consonant
              numwords = m_Dict->SearchPercentage (m_Results, "bcdfghjklmnpqrstvwxz", m_Search1);
              break;

    case (8): // Custom percentage.
              numwords = m_Dict->SearchPercentage (m_Results, (char *) m_Search2.operator LPCTSTR (), m_Search1);
              break;

    case (9): // Words that contain certain letters.
              numwords = m_Dict->SearchLetters (m_Results, (char *) m_Search2.operator LPCTSTR ());
              break;

    default: ASSERT (0);
  }

  if (numwords != 0)
  [ CString temp;
    temp.Format ("\r\n# words: %d", numwords);
    m_Results += temp;
  }

  UpdateData (FALSE);

Thanks!
0
Comment
Question by:bobshoe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 150 total points
ID: 1172075
Hmm... You seem to have a bracket where an opening "swirly brace" should be, i.e. one of these:   {

Change this


if (numwords != 0)
[ CString temp;
  temp.Format ("\r\n# words: %d", numwords);

to:


if (numwords != 0)
{ CString temp;
  temp.Format ("\r\n# words: %d", numwords);

That ought to fix it.
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1172076
If you have any questions, please feel free to ask!
0
 

Author Comment

by:bobshoe
ID: 1172077
Thanks! I knew it would be simple!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question