Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
1006 B

  1. ## Namespaces
  2. ## Input/Output
  3. ## Global Variable
  4. ```c++
  5. using namespace std;
  6. #include <iostream>
  7. double a = 128;
  8. int main ()
  9. {
  10. double a = 256;
  11. cout << "Local a: " << a << endl;
  12. cout << "Global a: " << ::a << endl;
  13. return 0;
  14. }
  15. ```
  16. ## Multiple Names for a Variable
  17. ## Passing Variables by Reference
  18. ```c++
  19. void change (double &r, double s)
  20. {
  21. r = 100;
  22. s = 200;
  23. }
  24. ```
  25. ## Functions Returning Variables not Values
  26. ## Static Variables
  27. ## Namespaces
  28. ```c++
  29. namespace foo
  30. {
  31. int a, b;
  32. }
  33. //in main
  34. first::a = 2;
  35. ```
  36. ## Inline -- similar to Macros
  37. ## Exceptions
  38. ## Default Parameters for Functions
  39. ## Function Overloading
  40. ## Operator Overloading
  41. ## Functions with Generic Parameter Types
  42. ## Replacement for malloc and free
  43. ## Struct Functions
  44. # Classes
  45. ## Class Constructor and De-constructor
  46. ## Scope
  47. ## Method Prototypes for Classes
  48. ## This keyword
  49. ## Class Inheritance
  50. ## "Abstract" Classes
  51. # File IO
  52. ## Writing to File
  53. ## Reading From File