0

hello everyone, i used the method substr() in a c++ program . I now need to convert my program in C. Does anyone know if there exists an equivalent of the method substr() in C???

5
Contributors
5
Replies
6
Views
11 Years
Discussion Span
Last Post by Salem
0
int validate (char *check[], int AMMOUNTINARRAY)
{
    int through = 0;
    bool error = false;
    do {
        if(!*check[through]=={'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'})
        error = true;
        through++;
    } while(through<=AMMOUNTINARRAY);
}

I know its just shorthand but the theory is the same

0

know its just shorthand but the theory is the same

And what theory would that be? How does your code snippet help the OP write a substr() function ?

And why respond to a year-old thread?

0

> And why respond to a year-old thread?
Because they can :rolleyes:

> if(!*check[through]=={'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'})
Gotta wonder what the hell that's supposed to achieve.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.