How do you use get line function in c plus plus?
string s;
istream::getline(std::cin, s );
In the above example, s will contain whatever data is extracted from the standard input stream, as a null-terminated string.
int x; istream::getline( std::cin, x );
In the above example, x will be non-zero if the standard input stream has a non-zero value. If the input stream is non-numeric, x will be zero.
What makes a variable a global variable?
a variable that is defined within a block is considered to have local scope, i.e., it is only visible to the block that contains it. Its lifetime is also limited unless it is marked as a 'static' variable, in which case it will exist for the entire length of program execution.
What is the Cdacl in c plus plus?
It's a wrapper for a discretionary access control list (DACL) structure. It is not part of the C++ standard, it's a Microsoft-specific class. Consult the MSDN for more information.
Are there any STL headers which are not part of the C plus plus Standard Library?
The Standard Library includes the Standard Template Library (STL). Therefore no, there are no STL headers that are not part of the Standard Library.
What are the benefits of using Greens Plus?
Greens Plus seems to have several benefits for those taking it. Some of those benefits include increased energy, a feeling of well-being and a better functioning immune system.
Benefits in studying master of computer applications?
There are benefits in almost every career you choose. Ultimately, it depends on your interest. If you like programming, then Software Engineering is the perfect choice for you. Plus, the average wage of a software engineer is quite high and they are currently in high demand throughout US and Canada.
Bjarne Stroustrup is the recognized inventor of the C++ object oriented programming language. C++ was an enhancement to the C language, which was not object oriented.
Inheritance vs instantiation in Java?
Inheritance is simply when you get properties and methods from a superclass, whereas instantiation is actually allocating an object in memory based on your class.
What are the disadvantage of operator overloading?
The only disadvantage of operator overloading is when it is used non-intuitively. All operators must behave with predictable results, thus it makes no sense to implement the plus (+) operator so that it behaves like a subtract (-) operator, or a multiply (*) operator, or indeed anything other than the intuitive sum of two objects.
A Geometer Template is a product made by Academic Industries, Inc. It is a patented, full-page sized semi-rigid plastic template, similar to a large ruler. Incorporated into the design are the most basic geometric shapes, the unit circle, and also metric and standard rulers. It enables students to draw accurate diagrams quicker, more accurately, and easier than drawing the shapes freehand.
The Geometer is widely used in High School math courses, particularly Geometry and Trigonometry, as well as at the college level and has been found, by teachers, to improve proficiency in math courses by allowing students to quickly draw diagrams that would otherwise take additional time, thus shifting the focus to the material itself and not the repeated drawing of diagrams.
C++ is a standard which is constantly reviewed an updated by the C++ standards committee. Bjarne Stroustrup, the original developer of C++, sits on this committee and oversees updates to the standard. Anyone can make an implementation of C++ provided it either follows the standard 100%, or provides suitable notification of any deviations from the standard. E.g., Microsoft provides the VC++ implementation, but that implementation does not fully adhere to the C++ standard, thus the VC++ documentation includes Microsoft-specific deviations from the standard.
Give me a C plus plus programming multiplication?
This is not a question, but here you are:
int x, y, z;
x=2;
y=3;
z=x*y;
How is encapsulation linked with access modifiers?
a class can control what information or data can be accessible by other classes
access modifiers sets usability of the methods defined in the class by other classes in either the same package or the other,
this is how acces modifiers encapsulates the variables or the methods from being used .
like there are 3 access modifiers--
1.protected-can be used in the same class or class which has inherited it .
2.default-can be used in the same package,but no acces to other classes.
3.public-can be used by classes in different package.
What is the concept of asterisk in c plus plus?
An asterisk in C++, such as int *data, is what's known as a pointer. A pointer is like a regular variable, but instead of holding a value, a pointer holds the memory location of the value.
It's a somewhat difficult concept, and you can learn more about it here:
See related links section below...
What is the significance of c plus plus by using ios class?
The ios type is a synonym for the STL class basic_ios, specialised for elements of type char with default character traits. It has the following type definition:
typedef basic_ios<char, char_traits<char> > ios;
The type is defined in <iosfwd>. It supports the ios class from the old iostream library.
How do you write a C plus plus program for destructor?
Class destructors define operations that will be performed whenever an object of the class falls from scope. This usually involves manually releasing any resources allocated to the object. However, by using resource handles or smart pointers, all resources will be released automatically, thus there is no need to define a destructor.
The only time we really need to define a destructor is when the class is intended to be used as a polymorphic base class (has one or more virtual methods) but does not inherit a virtual destructor, in which case we must define a virtual destructor. Classes that do define or inherit a virtual destructor cannot be used polymorphically. However, by using resource handles or smart pointers to manage resources, the destructor body can be left empty. The only reason for declaring the destructor at all is simply to declare it virtual because all methods are non-virtual by default -- unless they override a virtual method of the base class (in which case they can simply be declared as overrides).
The only time we need to define a non-empty destructor body is when implementing a resource handle or smart pointers, however the standard library already provides efficient implementations so, other than for educational purposes, there is no need to define our own resource handles.
When you choose iterative or recursive algorithm?
If you cannot find any iterative algorithm for the problem, you have to settle for a recursive one.
Turbo C++ keywords are the same as C++ keywords. The language remains the same, only the implementations differ. The Turbo C++ implementations were standards-compliant at the time of their release, but the product is no longer supported.
How can you make c and c plus plus language compatible with 64 bit operating system?
Language definitions (specifications) are independent of any Operating System. That is, neither the C nor C++ language specification has any dependence on a specific Operating System's features or the underlying hardware platform.
However, when implementing a C or C++ compiler on a specific Operating System and hardware platform, a variety of choices must be made. The Compiler implements the C or C++ language specification. Those specifications often give the compiler a choice in how to allow a certain feature to behave.
The most common choice is the default size of and Int and a Pointer. Neither the C++ nor C language require a certain specific size, and thus, compiler designers are free to chose.
What if unable to open conio.h file?
conio.h is not part of the standard library, either in C or C++. Some MS-DOS-based C compilers did provide it, but it is not required in any C++ implementation as the standard library already provides generic console input/output functions. If you have an MS-DOS-based C compiler and the file is missing, try re-installing the compiler. If the compiler does not provide a conio.h implementation, you can try downloading a 3rd party implementation.
(1) Install the software DOSBox ver 0.72 ( 1.2 MB ) (Freeware) from the link below (Direct Link)
http://prdownloads.sourceforge.net/dosbox/DOSBox0.72-win32-installer.exe?download
(2) Before going to the details u have to create a folder (any name will do). Here we name it as Turbo
(3) Copy the TC into the Turbo folder. You can download Turbo C/C++ here.
(4) Run the DOSBox 0.72 from the icon located on the desktop or from the location of the installation folder
(5) Then u are presented with two screens which look like the command prompt in Windows. One with a Z prompt. You can ignore the other screen.
(6) Type the following commands at the command prompt [Z]:
Mount [Type in any alphabet that u wish except z] [Type the source of the turbo C] press enter
(7) Now , Type in the following commands after the Z prompt:
Z: mount d c:\Turbo\ [The folder TC is present inside the folder Turbo]
(8) Now u should get a message which says: Drive D is mounted as a local directory c:\Turbo\
(9) Type d: to shift to d: prompt . Next follow the commands below
CD TC [The contents inside the folder Turbo gets mounted as a virtual drive (Here D drive)
CD Bin
TC or Tc.exe [This presents u the Turbo C++3.0 screen]
(10) In the Turbo C++ goto Options>Directories> Change the source of TC to the source directory [D] ( i.e. virtual D: refers to original c:\Turbo\ . So make the path change to something like D:\TC\include and D:\TC\lib respectively )
===========================================================
Points to Note:
(1) In order to get the full screen use the key combination of Alt and Enter
(2) When u exit from the DosBox [precisely when u unmount the virtual drive where Turbo C++ 3.0 has been mounted] all the files u have saved or made changes in Turbo C++ 3.0 will be copied into the source directory(The directory which contains TC folder)
(3) It is a good idea to backup your files in the source directory prior to running DOSBox 0.72
(4) For additional help go through the readme file located in the installation folder or look on the website of the DOSBox forum.
(5) Don't use shortcut keys to perform operations in TC because they might be a shortcut key for DOSBOX also . Eg : Ctrl+F9 will exit DOSBOX rather running the code .
How do you code a character literal?
char c = 'a';
'a' is a literal character, which assigns the value 0x61 (ASCII code 97 decimal) to the char variable c.
The following lines are therefore equivalent:
char a = 0x61;
char b = 97;
char c = 'a';
Is NET programming is update from C plus plus programming?
No. .NET programming is Microsoft-specific, similar to Java in some respects, but it is non-portable. C++ is a general purpose and cross-platform programming language.