User Avatar

peter forrest

@ pcforrest

joined in january 2020


  • c++ programming

what is the meaning of void array op in c plus plus ?

a void array is an array of unknown type. that is, it is an array of pointers to unknown data types (void*). a void array op is an operation that returns a void array. void arrays are commonly found in c code but are rarely encountered in c++.

  • c++ programming

why you use operator overloading in c plus plus ?

operator overloading

the mechanism of giving special meanings to an operator is known as operator provides a flexible option for the creation of new definitions for most of the c++ operators. we can almost create a new language of our own by the creative use of the function and operator overloading techniques.

  • c++ programming

what are the files that c plus plus can reads ?

the simple answer is none. c++ is a general-purpose programming language and file support is not part of the c++ standard. this is because file support is system-dependent and some systems (particularly embedded systems) have no notion of a file let alone a file storage device.

of course most systems do support files (and storage devices) and your c++ implementation will cater for them, but that support is provided by the implementation, not by the language itself.

if your implementation caters for more popular platforms (such as windows or linux) files then it will cater for any file type. whether you can actually read a particular file depends more upon the file permissions imposed by the system as the implementations that support files have few if any limitations.

in terms of writing c++ code to access files, your implementation will provide the essential means to open, read, write and close files. however, reading a file's content is not the same as understanding that content. all files are encoded in some way and it's up to you -- the programmer -- to write the appropriate code to interpret those encodings accordingly.

  • c++ programming

what is the definition of c plus plus ?

c++ is a general-purpose programming language that combines low-level "c-style" programming, high-level object-oriented programming, generic template meta-programming (including concepts) and compile-time computation.

  • c++ programming

write a c plus plus program that calculate area of the circle ?


// 15 decimal places -- accurate enough for nasa!!

const double pi {3.141592653589793};

double area_of_circle (double diameter) {

return pi * diameter;


int main () {

double diameter;

std::cout > diameter;