When to use standalone functions in C++?

1 day ago 1
ARTICLE AD BOX

I am a beginner C++ programer and I am trying to make a very simple random number generator for my program.

I started doing this by creating a struct in a header file but I am wondering if this is a good idea. All my methods and variables would be static since I don’t know what an object of this struct would even look like or why I would use it. So if everything is static, whats the point of having a struct.

I was told having standalone functions was a bad practice but how bad is it really. Is there a scenario where you shouldn’t use OOP and use isolated functions?

Read Entire Article