1. Engineering
  2. Computer Science
  3. please use the basic c to answer this question you...

Question: please use the basic c to answer this question you...

Question details

Please use the basic C++ to answer this question.

You will create 3 files:

"main.cpp" , "printme.h" and "printme.cpp"

In "printme.cpp" include the header files "iostream" and "printme.h" . Also include the line:

using namespace std ;

Write a function

void printme()

that uses "cout" to print "Hello World" to the screen.

The file "printme.h" will contain the declaration of this function "printme" .

In the file "main.cpp" include this file "printme.h" and call the function "printme" . Compile the 2 files "main.cpp" and "printme.cpp" to produce a single executable.

You may compile using the "make" utility or the command:

g++ -o hello.exe main.cpp printme.cpp

After the execution command run the command:

whoami

on the console. Take the source code for the 3 files and paste in a word document.
Take the snapshot of the compilation, execution and "whoami" output and paste in the
same word document. Submit the word document to canvas.


Run the executable to make sure the programming is running properly.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution