C++返回主界面
我希望能够从另一个文件返回 main.cpp 文件。例如。
// Main.cpp
#include "Globals.h"
int main()
{
otherFile();
}
// Globals.h
#include <iostream>
#include <stdlib.h>
bool otherFile();
//otherFile.cpp
#include "Globals.h"
bool otherFile()
{
// do stuff
// Here I want to be able to go back to the main.cpp file.
}
抱歉,如果我的问题没有意义
I want to be able to get back to the main.cpp file from another. For example.
// Main.cpp
#include "Globals.h"
int main()
{
otherFile();
}
// Globals.h
#include <iostream>
#include <stdlib.h>
bool otherFile();
//otherFile.cpp
#include "Globals.h"
bool otherFile()
{
// do stuff
// Here I want to be able to go back to the main.cpp file.
}
Sorry if my question makes no sense
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(3)
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
return
将把控制权返回给调用者,在本例中为 main.cpp 中的main()
。return
will return control to the caller, which in this case would bemain()
in main.cpp.