Please help me.

Program has the following definition:

char string[] = "1234";

How do I make a program which converts numbers given in a string to integer without using the "atoi" -function?

My greatest problem is how to compare a single character in a string.
For example

if (string[0]=="1") // this naturally is wrong

Thanks in advance.

Mikko, Finland