(for reference i am in c++, windows, borland 3 compiler)hey guys here is what i want to do, i am trying to save a file using <fstream> but want the player to pick a name to save the file as, so to do that i have to modify the string they input to say the path and the file extension in it (thus able to just ofstream.open(savename) type of a thing). as i understood it before the charecter strings are stored as arrays so i would use two strings and basically combine them using one spot at a time. but when i tried this it didn't work, any ideas?
Jump to Post
When working with C-style strings, the first thing you need to remember is to have enough memory. If you're going to tack a string onto another string, make sure that the destination string has enough memory to hold both strings plus one null character.
You can concatenate strings with …
Jump to Post
If you can get hold of a string class that handles all of this low level stuff behind the scenes, you'll be better off
Back in my 'ole highschool days in AP Computer Science class, we used a library called apstring, it's usage is similar to how java handles strings. …
All 6 RepliesReply to this topic
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.