Thread: Search Engine Looping

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    2

    Question Search Engine Looping

    I am writing a search engine. When you search something, the results come up, with another search box. Is there any way I can do that? Here is my code so far:

    Code:
    #include <string>
    #include <iostream>
    #include <cctype>
    #include <algorithm>
    
    using namespace std;
    
    int main()
    {
     string str1;
     cout << "HIDDEN";
     cin >> str1;
     cout << "\n";
     transform(str1.begin(),str1.end(), str1.begin(), tolower);
     // Results
      if(str1 == "hidden1")
      {
      str1 = " ";
      cout << "hidden results";
      cout << "Search: ";
      cin  >> str1;
      }
    else if(str1 == "hidden2") cout << "hidden results 2";
    else if(str1 == "hidden3") cout << "hidden results 3";
    else cout << "No files found";
    return 0;
    }
    In this code, the search box in the results doesn't work correctly!

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    Ummm.what? Search box? C++ has no concept of serach boxes.
    Please try to explain what on earth you are talking abot.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Use WinAPI and create another window?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    2
    Okay, I'm gonna close this, but what I was trying to do was create a search engine in C++ for DOS. I had everything right all along, but I had the transform function in the wrong place. I figured it out on my own. Thx, though!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another code search engine
    By Mario F. in forum Tech Board
    Replies: 0
    Last Post: 12-02-2006, 08:45 AM
  2. Search Engine - Binary Search Tree
    By Gecko2099 in forum C Programming
    Replies: 9
    Last Post: 04-17-2005, 02:56 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM