I am trying to make a coding language in c++. I am working on the print function but I would like to have it use double quotes. I would like to get the value inside this string "Hello" to just be Hello
while(getline(file,line)){ compile(line) } Compile function:
void compile(string cl){ // What I want it to do // if(cl.substr(0,cl.find(" ") == "print")){ cout << getStrInsideOfDoubleQuotationMarks(cl.substr(cl.find(" "),cl.length() - 1)); // The line equals print "Hello" } } Any help would be appreciated.
https://stackoverflow.com/questions/65526630/how-do-you-get-a-value-inside-of-a-double-quote-in-c January 01, 2021 at 08:59AM
没有评论:
发表评论