How long will it take me to get somewhat decent at c++ if I practiced around roughly 1 - 2 hours per day? My goal here is to learn allegro or sfml. I do not want to go to opengl or any other 3D supported library since I suck at math.
Below is my first c++ program from just learning in a couple of days.
It's a really easy mistake to make, when you pass a double into this function it will flatten it into an integer, so instead of passing in 1.5 you are actually only passing in 1.
it will then also return an integer so if you passed 1 into your function you would have
2.20462 * 1
which is technically 2.20462
but the function would then convert this back into an integer and would only return 2.
Other than that your code looks great. As long as you keep practicing you will get the hang of it really quickly, Allegro is considerably easier to get started with than sfml but is primarily a C based library without any object orientation.
If you want to work with C++ SFML is probably a better choice and has plenty of documentation. it is also absolutely fantastic.
It's certainly worth jumping in and seeing how far you can get with it
It's really about how much effort you are willing to put into learning C++, some people learn C++ in few days (yes, they learn pretty much everything about the language in just couple of days) some people take a bit longer to learn C++, if you have any prior programming knowledge then learning C++ won't be so hard, read books and watch youtube lessons tutorials.
The ability to focus for long periods of time and engage in directed practice is what separates the geeks from the non-geeks. Getting proficient takes less time. About a 10th of that.