问题描述
好吧,我一直在使用Dev-C ++学习语言[c ++],有些东西不能正常工作,像全局变量和局部变量。然后我决定下载Microsoft Visual C ++看看它是如何比较,它是绝对伟大的;尤其是其美学。有一件事,困扰我,虽然,因为我需要做很多小的源文件来测试我学到的东西,我必须做一个大的项目文件每次,占用〜18MB的空间。我试图只是一个源C ++文件,但它从来没有工作,因为编译和运行按钮不突出没有一个项目文件,按f5也不会产生任何结果。但是使用Dev-C ++,我可以打开它,控制+ n,并快速编写程序,编译,它会出现,不需要一个项目文件。因此,有没有办法在Microsoft Visual C ++中编译单个源文件,而不需要将项目文件包含在其中?
Well, I've been using Dev-C++ for a while for learning the language [c++], and some stuff wouldn't work properly, like global and local variables. Then I decided to download Microsoft Visual C++ to see how it compared, and it was absolutely great; especially with its aesthetics. One thing that has bothered me, though, is that since I need to make lots of small source files to test out things I've learned, I have to make a large project file each and every time, which take up ~18mb of space. I have tried to just make a source C++ file, but it never works since the compile and run buttons don't highlight without a project file, and pressing f5 yields no result as well. But with Dev-C++, I could just open it up, control+n, and write the program quickly, compile and it'd show up, no need for a project file. So is there a way to to compile single source files in Microsoft Visual C++ without needing to make a project file to include it in?
推荐答案
我通常做一个项目的临时工作,只是重新使用它。如果你真的迫切需要保持你的学习文件,然后只是做一个项目,添加新的源文件,并从构建中排除所有旧的。没有必要为每个临时或学习项目制作一个新项目。
I typically make one project for temporary work and just re-use it. If you have a really desperate need to keep around your learning files, then just make one project, add new source files, and exclude all the old ones from the build. There's no need to make a new project for every temporary or learning project.
这篇关于Microsoft Visual C ++,编译没有项目文件的小源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!