@alyssa hell yeah
@vaporeon_ @aescling there's almost always some sort of standard library container class for anything you'd use malloc for. I'd much sooner default to std::string in your situation
If the container doesn't exist then you can use the new keyword. I don't know of a situation you would use malloc other than to interface with C libraries or legacy C++ code
@vaporeon_ it was a very deliberate design choice when C++ was made in the 80s to not allow implicit void* conversions. It's one of the few very deliberate situations C++ fails to be a superset of C. You have to explicitly cast a void pointer to the exact type you want it to be
You can disagree with this choice but it was a choice made from basically the very beginning
@vaporeon_ you can use a C-style cast to convert a pointer to a char to a pointer to a 16-bit integer, which will almost certainly cause a runtime error
static cast won't let you do something like that
@vaporeon_ to oversimplify a bit it's like a c-style cast that has a lot more restrictions,and is checked by the compiler, to protect the programmer from making silly mistakes
@aescling @vaporeon_ I know enum basics but I don't understand the gorp = after the enum declaration
@vaporeon_ I don't want to become a C++ master.
@vaporeon_ I gotta be real with you vappy, I have no idea what is going on here with the enum lol
@Ghast saw this and thought of you https://www.youtube.com/watch?v=umeGgEzSqlY
@amy believe or not, this is actually a good thing
@cam thank you so much for sharing this
the klodvestigator
i answer to Caleb, Clodsire, Clodboy, Clod, and Bumby. very leftist.
videogame enjoyer. mathematics hobbyist and recovering physicist. recovering software engineer. professional wonk. prophet of The Truth. the walking embodiment of "not diagnosed, but somethings wrong". i like animals that wear cowboy hats.
number of fat cock awards received: 56
header is by @vaporeon_
"i regret ever allowing him here" ~aescling
"oh you're one of those weird movie likers" ~Ti
"I just hate you so much" ~coriander
30+
he/him
sgraMrt