Custom proggraming language

Pages: 12
Well, strlen will work fine with a C string.

But you might want to consider making input_line, as well as randomaccess, a (std::)string, and use string::length() instead.

This will mean you need this:

Last edited on
Thanks for that. This should be my final post about this unless someone says that they want in. What is the line of code for anything. My idea didn't work. My Idea:

if (strncmp(input_line, string, 1 ) == 0) {
What is "string" in that line of code?

If that's supposed to be a std::string then I think you need to reread the tutorial articles on this site, and read through the information on std::string, strncmp, etc. and then try again.

Never mind, I figures it out and string was supposed to represent a blank thing a.k.a. something that you can't write an ifr statement for.
Topic archived. No new replies allowed.
Pages: 12