std::cout << "You have " << itemCount << " items of type " << itemType << "." << std::endl;
When I could do this: printf("You have %d items of type %s.\n", itemCount, itemType.c_str()); std::cout << "You have " << itemCount << " items of type " << itemType << "." << std::endl;
When I could do this: printf("You have %d items of type %s.\n", itemCount, itemType.c_str()); printf("You have %d items of type %s.\n", itemCount, itemType.c_str());
When I could do this: std::println("You have {} items of type {}.", itemCount, itemType);
https://en.cppreference.com/w/cpp/io/printEdit: Oh, it's in C++23 standard. Only took them 38 years! ;-)
We do students a disservice teaching them how to “code” first. And not instead how to solve problems with code
But a real fucked up mental model to bake into an entire industry’s worth of developers
I also don't know any school, college or university that starts their programming courses in a webbrowser. Typical languages in Germany for a first semester algorithms/data structures class are either Java or C++.
What you explained happens in Germany is pretty par for the course in the US as well for CS degrees. But even then, why the hell are we throwing a book of data structures at students? You don’t give an apprentice framer a nail gun and say “go at it!”. They’ll destroy everything. You give them a hammer and educate them when they start to complain of smashed thumbs
puts "You have #{itemCount} items of type #{itemType}."
print(f"You have {itemCount} items of type {itemType}.")
console.log(`You have ${itemCount} items of type ${itemType}.`)