• Complain

it-ebooks - C++ FAQ Lite

Here you can read online it-ebooks - C++ FAQ Lite full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2016, publisher: iBooker it-ebooks, genre: Politics. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

it-ebooks C++ FAQ Lite
  • Book:
    C++ FAQ Lite
  • Author:
  • Publisher:
    iBooker it-ebooks
  • Genre:
  • Year:
    2016
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

C++ FAQ Lite: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "C++ FAQ Lite" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

it-ebooks: author's other books


Who wrote C++ FAQ Lite? Find out the surname, the name of the author of the book and a list of all author's works by series.

C++ FAQ Lite — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "C++ FAQ Lite" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
[1]
[1]
FAQs in section [1]:
  • [1.1]
  • [1.2]
  • [1.3]
  • [1.4]
  • [1.5]
  • [1.6] C++-FAQ-Lite != C++-FAQ-Book
1.1
1.2

The entire C++ FAQ Lite document is Copyright 1991-2000 Marshall P. Cline, Ph.D..

The entire C++ FAQ Lite document is Copyright 1991-2000 Marshall P. Cline, Ph.D.

1.3

If all you want to do is quote a small portion of C++ FAQ Lite (such as one or two FAQs) in a larger document, simply attribute the quoted portion with something vaguely similar to, "From Marshall Cline's C++ FAQ Lite document, www.parashift.com/c++-faq-lite/".

If you want to make a copy of large portions and/or the entire C++ FAQ Lite document for your own personal use, you may do so without restriction (provided, of course, that you don't redistribute the document to others, or allow others to copy the document).

If you want to redistribute large portions and/or the entire C++ FAQ Lite document to others, whether or not for commercial use, you must get permission from the author first (and that permission is normally granted; note however that it's often easier for you to simply tell your recipients about the one-click download option). In any event, all copies you make must retain verbatim and display conspicuously all the following: all copyright notices, the Author section, the Copyright Notice section, the No Warranty section, the C++-FAQ-Lite != C++-FAQ-Book section, and the Copy Permissions section.

If you want more and/or different privileges than are outlined here, please contact me, . I'm a very reasonable man...

C++ FAQ LiteFAQ"From Marshall Cline's C++ FAQ Lite document, www.parashift.com/c++-faq-lite/"

/C++ FAQ Lite

/C++ FAQ LiteC++-FAQ-Lite != C++-FAQ-Book

/

1.4

THIS WORK IS PROVIDED ON AN "AS IS" BASIS. THE AUTHOR PROVIDES NO WARRANTY WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE WORK, INCLUDING WARRANTIES WITH RESPECT TO ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE.

1.5
  • Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.
  • All other trademarks are the property of their respective owners.
1.6 C++-FAQ-Lite != C++-FAQ-Book

C++ FAQ LiteC++ FAQ Book C++ FAQClineLomowand GirouAddison-Wesley 500%[3]

[12]
[12]
FAQs in section [12]:
  • [12.1]
  • [12.2]
  • [12.3]
12.1
#include "Fred.hpp" // Fred void userCode(Fred& x) { x = x; // }#include "Fred.hpp" // Fred void userCode(Fred& x, Fred& y) { x = y; // &x == &y } int main() { Fred z; userCode(z, z); }
12.2

bug

class Wilma { }; class Fred { public: Fred() : p_(new Wilma()) { } Fred(const Fred& f) : p_(new Wilma(*f.p_)) { } ~Fred() { delete p_; } Fred& operator= (const Fred& f) { // delete p_; // Line #1 p_ = new Wilma(*f.p_); // Line #2 return *this; } private: Wilma* p_; };

Fred*thisf line #1this->p_f.p_ line #2*f.p_

FredFred

Fred::operator= (const Fred&)new Wilma(*f.p_)Wilmathis->p_

12.3
Fred& Fred::operator= (const Fred& f) { if (this == &f) return *this; // // ... return *this; }

FAQnewWilma

Fred& Fred::operator= (const Fred& f) { // Wilma* tmp = new Wilma(*f.p_); // delete p_; p_ = tmp; return *this; }

if (this == &f) return *this;Fredif() if99.9%

[13]
[13]
FAQs in section [13]:
  • [13.1]
  • [13.2]
  • [13.3]
  • [13.4]
  • [13.5]
  • [13.6] operator==char[]
  • [13.7] operator**
  • [13.8] Matrix
  • [13.9] Matrix
  • [13.10]
13.1

C/C++

class Fred { public: // ... }; #if 0 // Fred add(Fred, Fred); Fred mul(Fred, Fred); Fred f(Fred a, Fred b, Fred c) { return add(add(mul(a,b), mul(b,c)), mul(c,a)); // ... } #else // Fred operator+ (Fred, Fred); Fred operator* (Fred, Fred); Fred f(Fred a, Fred b, Fred c) { return a*b + b*c + c*a; } #endif
13.2
13.3
  • myString + yourStringstd::string
  • myDate++Date
  • a * bNumber
  • a[i]Array
  • x = *p "smart pointer" px
13.4
class Array { public: int& operator[] (unsigned i); // // ... }; inline int& Array::operator[] (unsigned i) // { // ... }

operator

int main() { Array a; a[3] = 4; // ... }

:

13.5

C .? :sizeofC++::.*

class Array { public: int& elem(unsigned i) { if (i > 99) error(); return data[i]; } private: int data[100]; }; int main() { Array a; a.elem(10) = 42; a.elem(12) += a.elem(13); }class Array { public: int& operator[] (unsigned i) { if (i > 99) error(); return data[i]; } private: int data[100]; }; int main() { Array a; a[10] = 42; a[12] += a[13]; }
13.6 operator==char[]

C++ std::string

13.7 operator**

C++operator**

x ** yx * (*y)ypow(base,exponent)

operator^

13.8 Matrix

operator()operator[]

,operator()operator[]operator[]operator()

class Matrix { public: Matrix(unsigned rows, unsigned cols); double& operator() (unsigned row, unsigned col); double operator() (unsigned row, unsigned col) const; _// ..._ ~Matrix(); // Matrix(const Matrix& m); // Matrix& operator= (const Matrix& m); // // ... private: unsigned rows_, cols_; double* data_; }; inline Matrix::Matrix(unsigned rows, unsigned cols) : rows_ (rows), cols_ (cols), data_ (new double[rows * cols]) { if (rows == 0 || cols == 0) throw BadIndex("Matrix constructor has 0 size"); } inline Matrix::~Matrix() { delete[] data_; } inline double& Matrix::operator() (unsigned row, unsigned col) { if (row >= rows_ || col >= cols_) throw BadIndex("Matrix subscript out of bounds"); return data_[cols_*row + col]; } inline double Matrix::operator() (unsigned row, unsigned col) const { if (row >= rows_ || col >= cols_) throw BadIndex("const Matrix subscript out of bounds"); return data_[cols_*row + col]; }

m(i,j)Matrixmm[i][j]

int main() { Matrix m(10,10); m(5,8) = 106.15; std::cout << m(5,8); // ... }
13.9 Matrix

FAQ Matrix Arrayoperator]Arrayoperator[] Matrixdoublem[i][j] [m(i,j)

operator()[][]operator()[][]

[][]operator()

operator()[][]

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «C++ FAQ Lite»

Look at similar books to C++ FAQ Lite. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «C++ FAQ Lite»

Discussion, reviews of the book C++ FAQ Lite and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.