Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. What is the C# equivalent of this code?

What is the C# equivalent of this code?

Scheduled Pinned Locked Moved C#
data-structuresquestioncsharp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Angelinna
    wrote on last edited by
    #1

    string lookFor; // used to store the restaurant name we are looking for BOOL bFound; //Take the 1st element in the linked list while ( ! ListEmpty(l) ) { lookFor = l->elem->restaurant; // Storing r. name for the current list element... bFound = FALSE; tmp = q->front; // Get the first element in the queue while( ( ! QueueEmpty(q) ) && ( ! bFound ) ) { cout << tmp->item << tmp->cuisine << tmp->mode << endl; if ( ! strcmp(tmp->restaurant, lookFor) ) { bFound = TRUE; // found what we were looking for! } else tmp = tmp->next; // still not found, search further in the queue } if ( bFound ) // It was found { //Do what you please with the info in *tmp* //it is the coresponding to the current list item }

    C 1 Reply Last reply
    0
    • A Angelinna

      string lookFor; // used to store the restaurant name we are looking for BOOL bFound; //Take the 1st element in the linked list while ( ! ListEmpty(l) ) { lookFor = l->elem->restaurant; // Storing r. name for the current list element... bFound = FALSE; tmp = q->front; // Get the first element in the queue while( ( ! QueueEmpty(q) ) && ( ! bFound ) ) { cout << tmp->item << tmp->cuisine << tmp->mode << endl; if ( ! strcmp(tmp->restaurant, lookFor) ) { bFound = TRUE; // found what we were looking for! } else tmp = tmp->next; // still not found, search further in the queue } if ( bFound ) // It was found { //Do what you please with the info in *tmp* //it is the coresponding to the current list item }

      C Offline
      C Offline
      c2423
      wrote on last edited by
      #2

      You keep asking the same thing, and at least 2 of us have asked for further clarification a couple of threads down from your original posts. I suggest that you re-read these comments carefully, and rephrase your question to address the points people have raised.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups