what is prototype in c++ please give me the structure and an example.?
101346
A "protoype" is a statement that simply tells the program the format of a function call.\n\nLet's say that you create a function that adds up two doubles:\n\ndouble Add (double A, double B)\n{\n   return A + B;\n}\n\nNow in the header file associated with this function you would insert a function prototype:\n\ndouble Add (double A, double B);\n\nwhich you will notice looks very much like the function declaration itself.\n\nWhy do you need to do this? It is simple actually. If you were to call the function "Add" in another file, this other file does not know what types the parameters are, and what type the return value is. In order for the compiler to do its job, it needs to know this information.\n\nSo you simply "#include" the header file with the prototype, and the prototype does not actually perform anything other than telling the compiler that the function has two parameters, both of type double, and that the function returns a double.\n\nHope this helps!
419823
You may have to be more specific.\n\nalgorithm.h is not a standard library, as such it will be impossible to know what kind of code is in it.\n\nThere are numerous sorting algorithms, some more efficient than others.  There's bubble-sort, insertion-sort, heap-sort, quick-sort, etc.  If you're interested in searching and sorting, try doing a google search.\n\nThere is a sort() tool for UNIX systems, but that uses data streams and pipes at the console level, not intended for use inside a program.\n\nIf you want, you can open up algorithm.h and take a look inside.  You won't be able to see what the function definitions are, but at least you can see what parameters it takes.  Also, if you're really lucky ;-) there will be comments in the file describing what kind of sort it uses.  Just do a little detective work, and you can get all the info you need.
148785
ignacionr2 has the most correct response to this question.  The standard C++ library has a 'string' type in the standard ('std') namespace that allows you to declare and initialize an abstract string type.\n\nNote, the header files for the standard C++ library no longer have the ".h" extension on them.  So for I/O streams, you'd use: "#include <iostream>" and for strings, you'd use: "#include <string>".\n\nTo declare instances of a string, you could use:\n\nstd::string myString = "string one";\n\nor\n\nstd::string myString("string two");\n\nYou can add a "using std::string;" to your local scope as a shortcut to avoid typing "std::" to qualify the standard string's namespace.
423121
are you talking about c++? i have a nice header file that i can give you.. maybe thatll help
478954
Think of it like this:\n\nDevelopment - designing & building the prototypes\n\nValidation - testing in-house and sending protptypes to different places for testing\n\nA google.com search will give you dozens of sites with the details
622383
From an OO perspective, it is the single most important feature of C++:\n\nA virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class. \n\nThe derived class can either fully replace ("override") the base class member function, or the derived class can partially replace ("augment") the base class member function. The latter is accomplished by having the derived class member function call the base class member function, if desired.
751588
Sorry.... i guess ur question a lil tricky.... Well i am C++ prog and work on the VC++ platform...
758524
In Java, everything is an object. This way, true encapsulation is achieved. Java is more strongly typed than C++. Java also has stronger enumerated types and the ability to synchronize threads.\n\nWith Java's swing library, it makes it easier to develop GUI applications. A single window can be created by using a few lines of code with Java rather than hundreds for C++...
644724
consider ...\n\nstruct test\n{\nint x;\nint y;\nstruct test next_t;\n};\n\nhow big would it be? it would try to go on forever - it's a recurring structure\n\nnow consider\n\nstruct test\n{\nint x;\nint y;\nstruct test *pnext_t;\n};\n\nmuch better - the definition 'stops' at *pt which needs to be assigned a value (pointer to a struct test) so only growing as required.\n\nso, you can next structures as long as there is no self referencing structure causing a referencing loop - and you can nest pointers to structures - which is usually the best way to proceed
177983
simple chk out:\n\nhttp://www.cplusplus.com/doc/tutorial/structures.html
105117
Basically, you have one structure with some functions definitions and/or variables.  Then you make another structure that inherits the functions and varaibles from the 1st structure.  This new struture can have new variables and functions as well.  Some of this is language dependent.
399952
If you've never used an object-oriented language before, you need to understand the underlying concepts before beginning to write code. You need to know what an object is, what a class is, how objects and classes are related, and how objects communicate by using messages. The first few sections of this chapter describe the concepts behind object-oriented programming. The last section shows how these concepts translate into code. \nWhat Is an Object?\nAn object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. \nWhat Is a Message?\nSoftware objects interact and communicate with each other using messages. \nWhat Is a Class?\nA class is a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind. \nWhat Is Inheritance?\nA class inherits state and behavior from its superclass. Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. \nWhat Is an Interface?\nAn interface is a contract in the form of a collection of method and constant declarations. When a class implements an interface, it promises to implement all of the methods declared in that interface. \nHow Do These Concepts Translate into Code?\nThis section looks at a small applet, and shows you the code that creates objects, implements classes, sends messages, establishes a superclass, and implements an interface.
834525
im no good with C++ but i think your missing some things at the end.
856966
method is like a function if you familiar with c or c++.\nMethod is called like a function the same way you did in c or c++\nMethod in class is a method which associates with its data and other members like functions, objects, etc.\n\nWhile object method is a method which is invoked or called by the object as a referrence. It can also calls a method from another class, depending on your hierarchy, where the other class must either be on top(base class) or same level or at the bottom as long as it has the linkage. To do this, u must use a polymorphism technique (which mostly learn at the institute).\n\nPlease refer to the reference book for this --I'm out of my memory for this!! I've been graduated for a long time ago:)\nBut if you have a technical problem to be solved, you can ask me.\nThis is my email:-> k_mz79@yahoo.com
253406
All you need to program in C++ is a compiler and notepage.\n\none of the more popular is located here: \n  http://www.delorie.com/djgpp/\n\nAs for examples there's TONS on the Net, a simple Google Search for 'C++ examples'  returned over 32,000 hits.
397445
A template is a mechanism for specifying the type of data to be handled by a class (or function) when we declare an object of that function (or when a call is made to that function).\n\n Polymorphism is the ability to respond in different ways based on the context in which the the call is made.There are different kinds of polymorphism.\n\nIn c++ polymorphism is acheived using overloading and overridding.\n\nyou can go through some books on C++ to understand it more clearly.
265933
Object is an instance of a class.\n\nConstructor is a also a method which only gets called when an object is instantiated.  (ex. Myclass a = new Myclass)\n\nMethod is a new term for function.  You may write lines of codes inside of a method, and reuse it everytime(OO design)\n\nclass MyClass\n{\n   MyClass() // constructor\n   int AddNumber(int a, int b);  // method AddNumber returns a+b\n}\n\nmain\n{\n  Myclass myObject = new MyClass();  // myObject is an object\n  int sum = myObject.AddNumber(1,2); // 1 + 2 = 3\n  return 0;\n}\n\n\nHope that helps!!! Go java