void Gameplay(sf::RenderWindow& Display)
{
...
}
In general, read up about pass by value and pass by reference, as they are important C++ concepts. :D
In general, read up about pass by value and pass by reference, as they are important C++ concepts. :DThis is what you need to do, instead of coming here asking very, very basic C++ questions ;)
No, disregard zsbzsb, he's old and grumpy.Don't start to offend other people just because you don't like their opinion. Especially when their tone is friendly and even helpful (note how zsbzsb also showed the correct code).
Don't start to offend other people just because you don't like their opinion. Especially when their tone is friendly and even helpful (note how zsbzsb also showed the correct code).
Don't start to offend other people just because you don't like their opinion.
zsbzsb's point is a good one: You can't learn SFML when you lack the basic understanding of the C++ language. I know there are plenty of people who don't believe this, they'll always make their lives harder than necessary. And I really mean that, because I've made exactly the same experience when I began... In hindsight I could have saved so much time and troubles ;)
Yes haha! But in all seriousness, no. Sure experimenting with librairies is a good thing, but they should know correctly the fundamentals of C++. Reference is a fundamental. I'm not saying they should not all idioms and produce perfect idiomatic code, but they should know about reference, operator overloading(at least the rules of three(which would have explain a little bit the problem with the non-copyable class)), and other things like that.zsbzsb's point is a good one: You can't learn SFML when you lack the basic understanding of the C++ language. I know there are plenty of people who don't believe this, they'll always make their lives harder than necessary. And I really mean that, because I've made exactly the same experience when I began... In hindsight I could have saved so much time and troubles ;)
Also, at what stage have you learnt basic C++? He may well have learnt about basic structure, functions and classes without having properly taken in references by coincidence. Should one completely abstain from trying out things until they're fully up to date with ISO/IEC 14882:2011?