Are you over 18 and want to see adult content?
More Annotations
A complete backup of parisattitude.com
Are you over 18 and want to see adult content?
A complete backup of worldpublicopinion.org
Are you over 18 and want to see adult content?
A complete backup of allaboutscience.org
Are you over 18 and want to see adult content?
A complete backup of transfusion.com.au
Are you over 18 and want to see adult content?
A complete backup of venice-tourism.com
Are you over 18 and want to see adult content?
Favourite Annotations
A complete backup of https://mattdm.org
Are you over 18 and want to see adult content?
A complete backup of https://drcolbert.com
Are you over 18 and want to see adult content?
A complete backup of https://lanner-america.com
Are you over 18 and want to see adult content?
A complete backup of https://mykoho.jp
Are you over 18 and want to see adult content?
A complete backup of https://baxrecreatieshop.nl
Are you over 18 and want to see adult content?
A complete backup of https://laboratorioechevarne.com
Are you over 18 and want to see adult content?
A complete backup of https://aqualogo.ru
Are you over 18 and want to see adult content?
A complete backup of https://cuusoo.com
Are you over 18 and want to see adult content?
A complete backup of https://emaramures.ro
Are you over 18 and want to see adult content?
A complete backup of https://abiturient.ru
Are you over 18 and want to see adult content?
A complete backup of https://5xak73xyuv.ga
Are you over 18 and want to see adult content?
A complete backup of https://cognella.com
Are you over 18 and want to see adult content?
Text
ANTHONY’S NOTES
DATA STRUCTURES
ARRAYS
/* Created on the stack */ int arr; // {?, ?, ?, ?, ?} int arr = {1, 2, 3, 4, 5}; // {1, 2, 3, 4, 5} int arr = { }; // {0, 0, 0, 0, 0}/* Accessing */
temp = arr;
temp = arr;
/* Created on the heap */ int* arr = new int // delete with: delete arr; double* arr = new double;/* Accessing */
temp = *arr;
temp = *(arr + 1); CHARACTER ARRAYS AND STRINGSchar word;
char word = {'H', 'e', 'l', 'l', 'o'}; char word = "Hello"; // print with: printf("%c", word) or printf("%c", *(word + i)); const char* word = "Hello" // print with: printf("%s", word);KEYWORDS
STATIC
Static variables in a function // Allocated for the lifetime of the program // If function is called several times, the value of the variable carried throughvoid f() {
static int count = 0; std::cout << count << std::endl;count++;
}
int main() {
f(); // 0
f(); // 1
}
Static methods in a class and static data members in a class. Belong to the class rather than a single instatiation. Use ':::'VIRTUAL
A virtual function is declared within a base class and is re-defined (overriden) by a derived class. When you refer to a derived class object using a pointer or reference to the base class, you can call a virtual function for that object and execute the derived class’ version of the function.class base {
public:
virtual void print() { cout << "print base" << endl;}
void show() {
cout << "show base" << endl;}
};
class derived : public base {public:
void print() {
cout << "print derived" << endl;}
void show() {
cout << "show derived" << endl;}
};
int main() {
base *bptr;
derived d;
bptr = &d;
// virtual function, binded at runtimebptr->print();
// non-virtual function, binded at compile timebptr->show();
}
output:
print derived
show base
Using the override keyword in the derived class’ function will cause a compiler error if the two functions’ signatures do not exactly match. Think of this keyword as saying “This function MUST override the base class’ function”.class base {
public:
virtual void func() { cout << "Hello" << endl;}
};
class derived : public base {public:
// Add override to the signature to throw an error void func(int a) { cout << "Hello, I'm derived" << endl;}
};
int main() {
base b;
derived d;
cout << "Compiled successfully" << endl;}
GIT
Git Pro book
Check which files are in which state. The right column indicates the status of the working tree and the left column indicates the status of the staging area. Add -s for less verbose output.git status
Add files to staging area. The files are added in the state they were in when this command was executed. So you must run this after eachchange to the file.
git add
View exact lines that were changed but not staged. A more specific version of git status. Add --staged or --cached to see lines that werechanged and staged.
git diff
Commit files. Add -a to add all tracked files for committing. Add -mcommand is run.
git commit
CONST/CHAR/* PERMUTATIONSCONST CHAR*
Pointer to a constant character. You cannot change the value of the constant character but you can change where the pointer is pointing.char a = 'A';
char b = 'B';
const char* ptr = &a; *ptr = b; // illegal, can't change A to B ptr = &b; // legal, can change ptr to point to BCHAR *CONST
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0