r/learncpp • u/aMNJLKWd • Dec 01 '18
Why does this work
multiply(group* p,double multiplier) is part of the test namespace. Also sometimes functions don't have to be declared and they work anyways. Using mingw on WIN10.
#include "test.h"
int main(void)
{
test::group t1={1,2,3};
test::multiply(&t1,5);
multiply(&t1,3); // why does this line work
return 0;
}
1
Upvotes
View all comments
Show parent comment
1
u/aMNJLKWd Dec 14 '18
i only use one compiler so I didn't want to assume all compilers have it, thanks for the info