|home |print view |recent changes |changed September 15, 2017 | |You are 22.214.171.124 <- set your identity!
Here come your solutions!
Answers to the questions. Add your signature using three tilde signs, to mark your personal answer.
Remove the declaration of sayHello() from main() in hello1.cpp. What happens when you try to compile it?
Remove the include guard from the header file sayhello.h and include the file twice in the corresponding main program hello.cpp. Do you expect an error? Do you get one? Why?
Perform the same removal of the include guard and double inclusion with the file Hello.h containing the class Hello. Do you expect an error? Do you get one? Why?
What happens when you compile hello.cpp without the implementation file containing the definition of sayHello()? Can you explain the error message?
What happens when you compile hello2.cpp without specifying the library containing the code compiled from sayhello2.cpp?
Since sayHello() is a function, you can call it from itself (sayhello.cpp). What happens if you call it after the output statement? What happens if you call it in front of the output statement? Why does this happen?
|home |print view |recent changes |changed September 15, 2017 |
|You are 126.96.36.199
<- set your identity!