Posts by Selma • 216 points
7 posts
-
1
votes2
answers6412
viewsA: What is the C++ copy builder for? How do I implement it?
Basically speaking, a copy constructor serves to make a copy, that is, for you to build an object that is a copy of another. Copy builders have the following signatures: MyClass( const MyClass&…
-
2
votes2
answers455
viewsA: What is the best alternative: define, enums or variables?
There are several pros and cons of each approach depending on the context, with respect to memory consumption and performance I believe that Enum and the constant variable are the same since Enum is…
-
5
votes1
answer67
viewsQ: Is there any way to get visual studio 2012 to support windows mobile 5.0
I have a project on visual studio 2008 for windows mobile 5.0 and would like to migrate it to the visual studio 2012, but I read that this new version of visual studio does not support windows…
-
2
votes3
answers100
viewsA: Removing cells at the beginning of a list
The only potential problem I see in this code is if you’re calling with something similar to this: evento_t **lista; lista = NULL; eventos_remover_inicio(lista); In this case the function will give…
-
5
votes4
answers6417
viewsA: How to split a string into C++?
Looking at your code the first thing I noticed was that its main function is not the way you posted, this does not even compile, I believe that there must be something missing in your post.…
-
2
votes5
answers436
viewsA: Refactoring: When is a method "too big"?
This question is really very relative. It depends a lot on the opinion of each one. In the code you posted above I would separate by steps, you yourself already separated, using comments, ie would…
-
3
votes2
answers942
viewsA: Function returns pointer to trash, and free locks the terminal
I saw the epx response and I realized that it got a little lost to understand why the following piece of code int *pontmaior = &maior; be wrong, what happens is that when you declare int…