This time we converted "Hello World" in a modular program. One module contains the message, and one sends the greeting.
Well, that's the way it's supposed to work, something funny is happening.
// Message to say hello const char[] message = "Hello World!\n";
#include <iostream>
extern const char* const message; // Message to say hello
int main()
{
std::cout << message;
return (0);
}
Source code for the string Source code for main
Hint 1: C++ is only partially typesafe.
Hint 2: The types char* and char[] are almost interchangeable.