330 likes | 424 Views
Graphical Development Environments for C++. Eclipse Widely available open-source debugging environment Available on Windows, Linux, others Designed to use g++ and other existing open-source tools Unfortunately not working on Urbauer Windows machines Visual Studio
E N D
Graphical Development Environments for C++ • Eclipse • Widely available open-source debugging environment • Available on Windows, Linux, others • Designed to use g++ and other existing open-source tools • Unfortunately not working on Urbauer Windows machines • Visual Studio • Specific to Windows but still widely used • Excellent multi-threaded debugger, eases Windows development • Uses Visual C++ (and other tools for other languages) • Works fine on Urbauer machines, so we’ll use this for now
Overview of Today’s Session • Start Visual Studio and create a C++ project • Look at the code and files it generated automatically • Create a simple “hello, world!” program • Build, fix, and repeat until the program compiles • Set breakpoints and step over lines of the program • Look at the program’s output in the debug terminal • Stepping off the end of the main program • Into the crtexe.c file from which the main function is called • Try printing out the program’s name (in argv[0]) • Look at different syntaxes for the main function • How those different forms treat argc and argv, for example
A Couple More Things to Try • Exercise: what do you see when you have the program print out argv[0]? • Why does it print that? • What is it printing vs. what we saw in previous sessions? • Exercise: change syntax of the main function to match what we used in earlier sessions • What does printing argv[0] show now? • What if you print out the other program arguments?