Is there any way possible to increase scope? (sic)
Unless you have explicit access to your program's stack, then no, there isn't a way. Your scope is limited to the conditional expression and the statement that follows it.
I used SFML for this and the switch statement says that once I click my left mouse button, the 2 sprites should move to a different position. It's fine until I move my mouse. Once I do that, they go back to their original position. I was thinking it's because of scope.
You aren't retrieving any events. You need an event loop, check the SFML tutorials for that.
I was thinking it's because of scope.
If this function is repeatedly called and you don't want to have your bullet etc. reset every time, then yes, you're creating those objects at the wrong place. If that's not the case, then the scope is fine.
If you just check the mouse button of an event once (a default-constructed and empty event, no less), how do you expect your objects to move every time a button is pressed?
You can store the mouse button state in a bool variable, for example.
Set it to true when the button is pressed and to false when it is released.
Then use the variable to decide whether you should move your objects each frame.
There's also a function to check the state of a mouse button (sf::Mouse::IsButtonPressed).
Thank you for cooperating with me through this whole topic. I'm a c++/sfml newb so I'm sorry if you got frustrated with me. It was a class problem the whole time lol. Thanks again.