Posts by Felipe Morschel • 54 points
3 posts
-
1
votes4
answers25657
viewsA: How to convert a char to an integer?
The strtol() function can solve your problem. Try something like this: int num; \\Variável para armazenar o número em formato inteiro char cNum[] = {0}; \\Variável para armazenar o número em formato…
-
2
votes1
answer1503
viewsQ: Problems using setlocale() in c
Hello. I’m new to the community so if I’m doing something wrong please correct me. I’m starting to program in C, and I’d like to be able to accentuate my programs. I found materials about it on…
-
0
votes4
answers3044
viewsA: Problem using Setlocale in C
Hello, I believe your problem is that setlocale() is passing the Brazilian numerical base where we use "," instead of "." which is the standard. Try running your code using commas, it should work.…