I am quite new to c++ and programming in general, so this will be a newbie question.
I am going through the tutorial provided by the cpp website and currently reading the function section.
My issue is this (>.<). I don't understand how the following code doesn't give an error because isn't "I'm a function!" a string value?
So when the function printmsg() is called shouldn't it create an error because it is void (no value)?
I'm guessing it is because it is calling a stream?
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
usingnamespace std;
void printmsg ()
{
cout << "I'm a function!" << '\n';
}
int main ()
{
printmsg ();
return (0);
}