How can I use ChatScript Library with function in my own program?

Viewed 234

How can I write a program that inside it, I can call ChatScript program, pass my input file to it and get the results as an output text file?

This is a example using ChatScript Library :

#include <fstream>
#include <iostream>
#include <string>
#include <chatScript.h> //for example!
using namespace std;

int main()
{
    ofstream output;
    string str1, str2;
    getline(cin, str1);

    //This is the ChatScript function that i am looking for!
    str2= ChatScript_input(str1); 

    output.open("output.txt");
    output<< "str2";
    output.close();

    return 0;
}
1 Answers
Related