新手提问Visual C++

upformyself 2006-08-13 10:35:01
请问,在Microsoft visual c++中,C++除了用DEBUG可以直接运行,别的还有什么模块可以在系统下直接运行啊?
还有一个问题,windows打开cpp1.exe运行完之后为什么会自动关闭?在调试ctrl+f5时为什么不会?
...全文
328 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
CW_Wei 2006-08-16
  • 打赏
  • 举报
回复
scanf
wswqwps 2006-08-15
  • 打赏
  • 举报
回复
最后加上 getch() 也可以。
JackWhere 2006-08-15
  • 打赏
  • 举报
回复
getch()
rollor_phoe 2006-08-14
  • 打赏
  • 举报
回复
是的,不过你也可以用在windows下,WinMain()函数开始。
Norris_Zhang 2006-08-14
  • 打赏
  • 举报
回复
楼主的第二个问题我刚在csdn里得到大侠的指点,自己试过好使。

VC++在Ctrl+f5时会自动加上system("PAUSE");这个函数,所以运行完可以出现:press any key to continue...,在.exe里没有这个函数就不停下直接退出了,解决的办法是:

#include < stdlib.h > //ststem()函数在这个头文件里
int main()
{
...
system("PAUSE"); //小写的pause也可以
return 0;
}
这样就可以了,楼主试试看,我试过可以。
upformyself 2006-08-13
  • 打赏
  • 举报
回复
第一个问题理解错了,是想问做普通C++程序时只能创建C/C++的.CPP文件么?
softboysxp 2006-08-13
  • 打赏
  • 举报
回复
第一个问题不知道你在说什么
第二个关闭是正常的, 因为程序返回了, 调试时VC会根进去后面的清理代码, 所以不会关闭(其实你一直单布运行到底还是会关闭的)
Product Description The leading author of programming tutorials for beginners introduces you to Visual C++ 2010 Ivor Horton is the preeminent author of introductory programming language tutorials; previous editions of his Beginning Visual C++ have sold nearly 100,000 copies. This book is a comprehensive introduction to both the Standard C++ language and to Visual C++ 2010; no previous programming experience is required. All aspects of the 2010 release are covered, including changes to the language and the C++ standard.. Microsoft Visual C++ is one of the most popular C++ development environments and compilers, used by hundreds of thousands of developers Ivor Horton's approach to programming tutorials has achieved a huge following; this book gives beginning programmers a comprehensive introduction to both Standard C++ and Visual C++ 2010 Covers all the language changes in Visual C++ 2010, library additions, new MFC features, changes in the Visual Studio development environment, and more Also includes a brief introduction to programming for multicore processors in native C++ and C++/CLR processors Nearly 100,000 copies of this book have been sold in previous editions Beginners seeking a complete education in Visual C++ will find everything they need in Ivor Horton's Beginning Visual C++ 2010. Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file. From the Back Cover Build real-world applications as you dive into C++ development By following author Ivor Horton's accessible tutorial approach and detailed examples you can quickly become an effective C++ programmer. Thoroughly updated for the 2010 release, this book introduces you to the latest development environment and teaches you how to build real-world applications using Visual C++. With this book by your side, you are well on your way to writing applications in both versions of C++ and becoming a successful C++ programmer. Ivor Horton's Beginning Visual C++ 2010: Teaches the essentials of C++ programming using both of the C++ language technologies supported by Visual C++ 2010 Shares techniques for finding errors in C++ programs and explains general debugging principles Discusses the structure and essential elements that are present in every Windows? application Demonstrates how to develop native Windows applications using the Microsoft Foundation Classes Guides you through designing and creating substantial Windows applications in both C++ and C++/CLI Features numerous working examples and exercises that help build programming skills Programmer Forums Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world. Code Downloads Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use. Read More Find articles, ebooks, sample chapters, and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you. Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved. wrox.com

33,321

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧