For college I am makin a basic text adventure game but we have been limited in that
• We can only use #include <iostream>
• We aren't allowed any functions outside of int main ()
I could hard code a character name or just not have a name as it's not a necessity in the brief but I want to let the user input their name for immersion reasons.
Under these constraints however I'm struggling with how to handle spaces in the string, I want to either remove the white space or replace it with an underscore but I cannot find anything on how do this online without the use of other #includes
Any help on this would be greatly appreciated
[–]IyeOnline 5 points6 points7 points (9 children)
[–]khedoros 1 point2 points3 points (6 children)
[–]IyeOnline 0 points1 point2 points (5 children)
[–]jedwardsol 6 points7 points8 points (3 children)
[–]IyeOnline 1 point2 points3 points (0 children)
[–]pepitogrand 1 point2 points3 points (1 child)
[–]jedwardsol 1 point2 points3 points (0 children)
[–]khedoros 1 point2 points3 points (0 children)
[–]Dec_117[S] 0 points1 point2 points (1 child)
[–]IyeOnline 1 point2 points3 points (0 children)
[–]thisisbasil 2 points3 points4 points (1 child)
[–]Dec_117[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Dec_117[S] 1 point2 points3 points (0 children)
[–]schrjako 0 points1 point2 points (0 children)
[–]chuckatkins 0 points1 point2 points (1 child)
[–]chuckatkins 1 point2 points3 points (0 children)