Write about the local class and mention its use?
No Answer is Posted For this Question
Be the First to Post Answer
whats the size of class EXP on 32 bit processor? class EXP { char c1; char c2; int i1; int i2; char *ptr; static int mem; };
What is a type library?
How should a contructor handle a failure?
What is ios flag in c++?
What is a set in c++?
What is the difference between reference type and pointers.
How to demonstrate the use of a variable?
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?"; } ///
Where the memory to the static variables is allocated?
Define the process of error-handling in case of constructor failure?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What is the extraction operator and what does it do?