You did not give sum an initial value.
Also, by using fgetc only, you will not be parsing numbers, but rather just reading characters.
You did not give sum an initial value.
Also, by using fgetc only, you will not be parsing numbers, but rather just reading characters.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)