When the design recommends static functions?
Answers were Sorted based on User's Feedback
Answer / manu
The design reccommends static functions when you need to
call the function even when the class is not instantiated.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / aruna kumar samal
When you want to use the function inside the program , not
outside then dsign recomend to do so. This does not have a
this pointer.static function maynot be virtual.there will
not be same version of static and non static function.
Is This Answer Correct ? | 0 Yes | 3 No |
What is function prototyping? What are its advantages?
Evaluate !(1&&1||1&&0) a) Error b) False c) True
What do you understand by zombie objects in c++?
What is the use of object in c++?
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?"; } ///
What do nonglobal variables default to a) auto b) register c) static
What is setfill c++?
Search for: what is pair in c++?
What is null c++?
How do you test your code?
Is dev c++ free?
Define token in c++.