C++ Pass A String

后端 未结 8 2031
自闭症患者
自闭症患者 2020-12-23 10:51

Quick probably obvious question.

If I have:

void print(string input)
{
  cout << input << endl;
}

How do I call it like

8条回答
  •  猫巷女王i
    2020-12-23 11:40

    Not very technical answer but just letting you know.

    For easy stuff like printing you can define a sort of function in your preprocessors like

    #define print(x) cout << x << endl
    

提交回复
热议问题