Posts by Ricardo Lima • 79 points
10 posts
-
0
votes0
answers30
viewsQ: "Dereferencing NULL Pointer" error in a chained list structure
My code deals with a simple endadeada list (then I will implement the pointer to turn double). But in the line strcpy_s(new_element->musica_name, musica_name); He keeps giving an…
-
-1
votes1
answer35
viewsQ: Pure C chained list error
I am making a simple chained list where struct has only one 'given' integer variable, the user type the data to be inserted right into the menu and it is played in the function that adds a new…
-
0
votes4
answers48
viewsA: Char variable is not receiving values in C
Person updating the post, the solution I found was to clean the keyboard buffer, under each scanf I added the following line: while ((c = fgetc(stdin)) != EOF && c != ' n') {} Obs: required…
-
0
votes4
answers48
viewsQ: Char variable is not receiving values in C
Good afternoon, everyone my variable char z is not working with either scanf_s or gets_s. With the scanf it generates an exception and locks the program, using gets_s at the time of entering the…
-
1
votes1
answer54
viewsQ: Hands with variable float and char
I am unable to assign an address to a pointer variable when it comes to float or char variables, the visual studio brings me the error "C++ a value of type cannot be Assigned to an Entity of type".…
-
1
votes1
answer52
viewsQ: pointer does not work in visual studio
Personal my question is simple but makes me unable to work with pointers, the variable 'y' simply does not receive the address of x in the example below: #include<stdlib.h> #include…
-
0
votes2
answers202
viewsQ: Force while loop output on C switch
Guys, I made a menu in C language, but I need that when the user type option 4, it comes out of the repetition loop of/while, someone can help me. Thanks again to all for participating. int opcao;…
-
2
votes1
answer108
viewsQ: Variable char error C Visual Studio
I’m having problems using scanf_s in a char variable only in the visual studio. When it reaches the scanf_s line the program stops and brings me the following error: Exception thrown at 0x7893E63C…
-
0
votes1
answer66
viewsQ: Force user to enter integer numbers in an array
Person, what would be the best structure to force the user to enter positive integers within an array (array), the code fragment I copied here is inside a function, it works ok when first executed,…
-
0
votes1
answer59
viewsQ: Counter with float number
I’m new to C programming. My problem is that I’m not able to add float numbers with an i counter, which would be integer, which is the best solution? #include <stdio.h>…