Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atoi converts a char * to an int, not to a long #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chapter7_evaluation.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h2 id='evaluation'>Evaluation</h2> <hr/>
<p>To detect the tag of a node, or to get a number from a node, we will need to make use of the <code>tag</code> and <code>contents</code> fields. These are <em>string</em> fields, so we are going to have to learn a couple of string functions first.</p>

<table class='table'>
<tr><td><code>atoi</code></td><td>Converts a <code>char*</code> to a <code>long</code>.</td></tr>
<tr><td><code>atoi</code></td><td>Converts a <code>char*</code> to an <code>int</code>.</td></tr>
<tr><td><code>strcmp</code></td><td>Takes as input two <code>char*</code> and if they are equal it returns <code>0</code>.</td></tr>
<tr><td><code>strstr</code></td><td>Takes as input two <code>char*</code> and returns a pointer to the location of the second in the first, or <code>0</code> if the second is not a sub-string of the first.</td></tr>
</table>
Expand Down