Posts by Marcelo Siqueira Lima • 11 points
4 posts
-
0
votes2
answers596
viewsA: Chained list - Error inserting element - [Warning] Passing argument 1 of 'strncpy' makes Pointer from integer without a cast
Is it my impression or did you forget to release the memory allocated by the list? Although it is practically not necessary, it is very timely. I also, for practicality, usually use a single chained…
-
0
votes3
answers98
viewsA: Conditional structure and repetition For simple in C
As already clarified, you used the assignment operator = and not that of equality ==. Common mistake, actually. Anyway, I wrote a little algorithm to contribute in some way. ^_^ #define LC_CTYPE 2…
canswered Marcelo Siqueira Lima 11 -
0
votes5
answers5734
viewsA: Inverting elements of a vector in C
#define LC_CTYPE 2 char* setlocale(int, const char*); int printf(const char*, ...); int scanf(const char*, ...); int _cdecl main(void) { setlocale(LC_CTYPE, "PtB"); // Para escrever em português do…
-
1
votes6
answers35893
viewsA: Keyboard buffer cleaning after scanf
There are several ways to clear the buffer (temporary storage area) of the keyboard. The most suitable is, of course, the following and has already been mentioned. It is the most recommended for…