Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
84 views

I'm working on some code for a PIC microcontroller PIC18F47J53. I'm using MPLAB X IDE v6.25 and the package PIC18F-J_DFP 1.9.170. Both are latest versions. A year ago, I used exactly the same code, ...
0 votes
2 answers
1k views

I am looking to develop a function that converts a series of ASCII characters (in their respective hex representation) to a single hex value. For example, an input string to this function may be {0x46 ...
0 votes
1 answer
251 views

I am trying to convert a string with max.10 characters into a float-value, using the atof-function. Unfortunately it is not working as the function returns an inaccurate value. Here is my code: #...
user avatar
0 votes
0 answers
56 views

There is a project of mine which utilizes coordinates to be entered by the user and then processing them for sunrise and sunset time calculations. Although everything seems to work fine but there is ...
-1 votes
2 answers
96 views

In c: Given the following code int a; char word[]=<some string> Is there a difference between? a = atoi(word) a = atof(word)
Niv's user avatar
  • 960
0 votes
2 answers
2k views

In C atof=a-to-f(loat) converts a string into a double precision float. I am wondering what the a part of atof stand for.
zmkm's user avatar
  • 157
0 votes
0 answers
113 views

I am writing a code that would parse incoming UART messages and extract the information that I want. I will be sending a command and then a floating number for example: "SET_VOLTAGE:2.4" I ...
Lukas's user avatar
  • 29
0 votes
1 answer
104 views

The problem is the next, generate a new string, 1. In the firt place : the firts letter of the name 2. In the second place : the third letter of the name 3. In the thitd place : The last letter of the ...
3 votes
1 answer
5k views

I know that strtod() and atof() functions are used for conversion from string to double. But I can't figure out the difference between these two functions. Is there any difference between these two ...
1 vote
1 answer
860 views

I am finding that atof is limited in the size of a string that it will parse. Example: float num = atof("49966.73"); cout << num; shows 49966.7 num = atof("499966.73"); cout ...
Deek880's user avatar
  • 37
-3 votes
3 answers
181 views

I want to use atof to convert my string to a double,the answer is correct ,but not very accurate ATTENTION: because of some other reasons, fscanf is not permitted my code is : #include <stdio.h> ...
KatrinaKing's user avatar
2 votes
1 answer
108 views

I'm reading double values from file as strings and parsing them with std::atof. Afterwards, I'm using the values as keys in a unordered map. It's seems to be working correctly, but is it guaranteed to ...
0 votes
1 answer
215 views

Reading from a .txt file, I would like to convert some values from a file, converting a string into doubles. Normally, I can print the desired values: string line; ifstream f; f.open("set11.txt&...
1 vote
2 answers
732 views

I am trying to make strings into doubles using the values that I obtained from a .txt file. The doubles I am obtaining have no decimals. I believe that this is because, in the .txt, the decimals of ...
0 votes
0 answers
144 views

I ́m learning to use these functions that change a string to an int or double, but atof doesn ́t work for me. char cadena[20]="3.1416"; double x=atof(cadena); printf("%g",x); I have this simple code, ...
IssacCloudVII's user avatar

15 30 50 per page
1
2 3 4 5
...
9

AltStyle によって変換されたページ (->オリジナル) /