What is the difference between operator new and the new
operator?
Answers were Sorted based on User's Feedback
Answer / vrushali
Operator new is a function name used for operator overloading and new operator is used for allocating memory
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / guest
operator new is just like malloc and
new is the conventinal new in C++
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / man
operator new is nothing
And new operator is used to allocate memory on the heap
| Is This Answer Correct ? | 0 Yes | 6 No |
What is singleton class in c++?
What is the latest c++ version?
What is namespace std; and what is consists of?
What is an undefined reference/unresolved external symbol error and how do I fix it?
Copy Linked List using recursive function?
What is the iunknown interface?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
write a C++ programming :if the no is between 32 to 50 it will be odd.
what are the characteristics of Class Members 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 is the Diffrence between a "assignment operator" and a "copy constructor"?
Difference between pointer to constant and constant pointer to a constant. Give example.