How to pass in command line arguments when using ideone?

前端 未结 3 513
轻奢々
轻奢々 2021-02-13 07:25

I\'m using the ideone online interpreter (http://ideone.com/) to test some C++ and Python programs. How do I specify the command line arguments instead of using the STDIN input?

3条回答
  •  感动是毒
    2021-02-13 08:04

    Just initialize to simulate the command line arguments

    static char *argv[] = {"program_name", "1st argument", "2nd argument", NULL};
    static int argc = 3;
    int main() {
    
    }
    

提交回复
热议问题