CS 3005: Programming in C++
Hello
In this assignment, you will configure your development environment for the course projects, create and use a source code repository, and create a simple “Hello, world.” program.
You should be concentrating on the process of editing, compiling, linking, running, committing and pushing your program. It would be optimal if you create a set of notes to guide you through this process as you complete future assignments this semester.
Assignment
If using your own computer system, install the GNU development tools. Instructions can be found from a link in the syllabus, titled “Notes for installing g++”.
If working in Windows, also read “Notes for editing in Windows and using build tools in bash”.
Clone the starter git repository using the link from the assignment page in Canvas.
Create the “Hello, world.” program in the git repository in a folder named src
.
The program source file must be hello.cpp
. Build and run the program, to be
sure your development environment is correctly configured.
Create a Makefile
to automate the commands to build the program.
Commit the Makefile
and hello.cpp
to source control, and push them to the cloud
repository.
Finally, verify that all push actions have completed successfully.
Programming Requirements
Create hello.cpp
This file must include definitions of the following functions:
int main()
- program function that displays the message “Hello, world.”.
Create Makefile
This file must include the rules to build the file hello.o
from hello.cpp
,
and to build hello
from hello.o
.
Additional Documentation
- C++ Reference
- Examples from class
- Notes for installing g++
- Notes for editing in Windows and using build tools in bash
- Notes for getting started with git
Show Off Your Work
To receive credit for this assignment, you must:
- Use git to add, commit and push your solution to your repository for this class.
Additionally, the program must build, run and give the correct output.
Last Updated 11/14/2022