Explain RAII (Resource Acquisition Is Initialization).

Answer Posted / nashiinformaticssolutions

• A programming idiom where resource allocation is tied to object lifetime. Destructors release resources.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is main function important?

813


How many types of scopes are there in c++?

778


What is a constant? Explain with an example.

733


In a function declaration what does extern means?

794


Is vector a class in c++?

779


What is the use of endl?

732


how to explain our contribution in the project?

3348


How would you use the functions randomize() and random()?

821


How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

765


Does there exist any other function which can be used to convert an integer or a float to a string?

823


What is encapsulation in c++ with example?

751


What is #include cstdlib in c++?

880


How new/delete differs from malloc()/free?

833


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include 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: "<

1835


What are files in c++?

760