the phrygian cap


luisbg

@luisbg

luis@debethencourt.com



Ohloh profile for Luis de Bethencourt
Blogalia




<Febrero 2018
Lu Ma Mi Ju Vi Sa Do
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Creative Commons License


planet gnome
planet ubuntu
alberto ruiz
andy wingo
jeff fortin
slomo's blog
jan schmidt
vincent's random waffle



"all religions, arts and sciences are branches of the same tree. all these aspirations are directed toward ennobling man's life, lifting it from the sphere of mere physical existence and leading the individual towards freedom." albert einstein

C++ Cheat Sheet



I spend most of my time writing and reading C code, but every once in a while I get to play with a C++ project and find myself doing frequent reference checks to cppreference.com. I wrote myself the most concise cheat sheet I could that still shaved off the majority of those quick checks. Maybe it helps other fellow programmers who occasionally dabble with C++.

class ClassName {
  int priv_member;  // private by default
protected:
  int protect_member;
public:
  ClassName() // constructor
  int get_priv_mem();  // just prototype of func
  virtual ~ClassName() {} // destructor
};

int ClassName::get_priv_mem() {  // define via scope
  return priv_member;
}

class ChildName : public ClassName, public CanDoMult {
public:
  ChildName() {
    protect_member = 0;
  } ...
};

class Square {
  friend class Rectangle; ... // can access private members
};


Containers: container_type<int>
 list -> linked list
  front(), back(), begin(), end(), {push/pop}_{front/back}(), insert(), erase()
 deque ->double ended queue
  [], {push/pop}_{front/back}(), insert(), erase(), front(), back(), begin()
 queue/stack -> adaptors over deque
  push(), pop(), size(), empty()
  front(), back() <- queue
  top() <- stack
 unordered_map -> hashtable
  [], at(), begin(), end(), insert(), erase(), count(), empty(), size()
 vector -> dynamic array
  [], at(), front(), back(), {push/pop}_back, insert(), erase(), size()
 map -> tree
  [], at(), insert(), erase(), begin(), end(), size(), empty(), find(), count()

 unordered_set -> hashtable just keys
 set -> tree just keys

16 Comentarios


Referencias (TrackBacks)

URL de trackback de esta historia http://luisbg.blogalia.com//trackbacks/76869

Comentarios

1
De: athletic greens coupon Fecha: 2018-02-08 06:42

This is a really good read for me. I must agree that this is one of the coolest article I have read this past few months. Thanks for posting this blog, please keep them coming.



2
De: quitoplan Fecha: 2018-02-08 10:22

Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. quitoplan



3
De: robert Fecha: 2018-02-08 11:22

Marquage de vehicule Essonne, Paris, fabrication et pose de publicité sur votre véhicule utilitaire ou voiture. pub voiture, flocage voiture, covering, stickers flocage vehicule Paris



4
De: Rea Fecha: 2018-02-08 16:57

I have already bookmarked this blog. This article is way better than the previous articles I've read. I really enjoyed reading this post and I totally agree with your opinion. Keep up the great work and more power! survival food



5
De: dubai lapita autograph Fecha: 2018-02-09 12:42

I always loved your style, you make everything sound so attention-grabbing. Anyway, thanks for the amazing and helpful share..



6
De: MREs Fecha: 2018-02-09 15:23

This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!



7
De: Energy company Fecha: 2018-02-10 10:19

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Energy company



8
De: robert Fecha: 2018-02-12 08:47

Your website is really cool and this is a great inspiring article. Thank you so much. detectives infidelidades Madrid.



9
De: Car Rental Larnaca Fecha: 2018-02-13 12:49

Car Rental Larnaca We at CosmosCarRental.com pay a high respect and attention to our clients! We keep you, the customer, happy. There are NO hidden costs.



10
De: Sabrina Fecha: 2018-02-13 13:20

It was just great to get the chance to visit your website please keep me posted for more updates. VigRX



11
De: clash of clans base layout level 9 Fecha: 2018-02-13 16:45

Gangaur Realtech is a professionally managed organisation specializing in real estate services where integrated services are provided by professionals to its clients seeking increased value by owning, occupying or investing in real estate. clash of clans base layout level 9



12
De: robert Fecha: 2018-02-15 12:26

I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. professionals. I thank you to help making people more aware of possible issues. Detectives Madrid



13
De: child care centre cleaners Fecha: 2018-02-15 12:47

I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you! child care centre cleaners



14
De: robert Fecha: 2018-02-17 10:11

Conseiller et orienter nos clients, apporter des solutions innovantes afin de valoriser votre image, mettre en place des actions de communication adaptées, c’est ce à quoi nous tentons de répondre pour soutenir votre activité. flocage voiture prix Covering vehicule



15
De: Male Enhancement Pills Fecha: 2018-02-18 16:39

As usual, amazing post full of excellent advice, very easy to understand and follow. Please, keep the greatness coming.



16
De: alcemccws01 Fecha: 2018-02-20 00:07

This is amazing articles and this topic concerns are really nice buy chicken feeders



Nombre
Correo-e
URL
Dirección IP: 54.226.76.27 (5c69f4a171)
Comentario
¿Cuánto es: mil + uno?

©2007-2015 luis de bethencourt guimera
powered by Blogalia