Explain the difference between using macro and inline functions?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

What operators can you overload in c++?

0 Answers  


Which software is best for c++ programming?

0 Answers  


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

0 Answers  


When is the last time you coded in C/C++? What is the most lines of original C/C++ code you have personally written in one project? How confident are you in your ability to write C or C++ without a reference?

1 Answers   Microsoft,


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?"; } ///

0 Answers  


What is the difference between struct and class?

1 Answers  


Differentiate between declaration and definition.

0 Answers  


What are the three forms of cin.get() and what are their differences?

0 Answers  


Explain static and dynamic memory allocation with an example each.

0 Answers  


What is pointer to array in c++?

0 Answers  


How can I improve my c++ skills?

0 Answers  


Why c++ is better than c language?

0 Answers  


Categories