how can u create a doubly linked list with out using
pointers?
Answers were Sorted based on User's Feedback
Answer / ana
by multiple or single array
multiple: 3 arrays(size n) . first array for next, second
for keys and third for prev
single: 3*n size array, elements by triplets - next, key,
prev
Is This Answer Correct ? | 5 Yes | 0 No |
What is Virtual Inheritance?
What is set in c++?
How does a copy constructor differs from an overloaded assignment operator?
Write a String class which has: 1) default constructor 2) copy constructor 3) destructor 4) equality operator similar to strcmp 5) constructor which takes a character array parameter 6) stream << operator
2 Answers HCL, Lehman Brothers, Zoomerang,
can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is <location>somewhere</location> #include <iostream> #include <fstream> #include <string> using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<<location << endl; cout << "Temperature: " << temperature << endl; system("pause"); } string find_field(string myPage,string find_string){ int temp=myPage.find(find_string); if(temp!=string::npos) { cout << "Match found at " << temp << endl; } return "found?"; } ///
How can I learn dev c++ programming?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
What are the steps in the development cycle?
What is a local reference?
Describe the advantages of operator overloading?
How a new operator differs from the operator new?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?