Search:
Type: Posts; User: KruSuPhy
Search:
Search took 0.14 seconds.
-
October 22nd, 2013, 10:00 PM
I'm not quite sure how to implement the SQLite into my program, but i'm going to look it up and try.
Also, as for the name with spaces problem I'm having, I attempted to use getline() for the input,...
-
October 21st, 2013, 11:20 PM
Well, I ran into that problem earlier. If the name contains a space, it only counts everything before the space. Which I assume you already knew. However, I'm not quite sure how to fix that. I'm sure...
-
October 21st, 2013, 10:12 PM
Okay, well, I finally understood what you all were telling me and went ahead and fixed it. It works/'seems' to work, so here's my code.
void Game::saveGame(Character player)
{
std::ofstream...
-
October 20th, 2013, 11:35 PM
Okay, I apologize, and I'm not doubting what you're saying at all. However, could you explain how my example is wrong? I tested it and it worked well enough. I'm not sure if I understand what's wrong...
-
October 20th, 2013, 10:06 PM
#include <iostream>
using namespace std;
class FileIO
{
public:
int numInt;
double numDouble;
string name;
-
October 20th, 2013, 10:49 AM
Post if you want, but at least try to provide some useful information as opposed to getting upset over something I've already apologized for.
Also, I'm sorry that I'm not exactly knowledgable in C++...
-
October 19th, 2013, 11:10 AM
Okay, I apologized for it. Don't get an attitude in my thread, you haven't even contributed in the slightest amount, thanks. If you don't have anything worthwhile to say, then don't post.
-
October 18th, 2013, 04:59 PM
Sorry, the example was pseudo-code someone suggested in another topic on another website. I'm afraid I don't have or know the complete code for that method, I was just wondering if there is a method...
-
October 17th, 2013, 04:02 PM
So, should I use something like this, then?
SaveGame(FileInput file) {
file.writeInt(playerLevel);
file.writeInt(playerHealth);
file.writeInt(gameProgress);
}
...
-
October 17th, 2013, 02:35 PM
I am currently not at home, and cannot post the code from my program, but I am using pretty much a replica of the code that PredicateNormative posted in my previous thread...
-
October 16th, 2013, 10:42 PM
Hi. I've been working on a battle simulator, and using it as a learning experience. So far, I've been able to debug the program(with some help), and learn some stuff, and it's been running smoothly....
-
October 10th, 2013, 09:34 PM
I'm not sure if you were saying that just as a tip, or if you meant it was the fix to my problem, but I removed the extra srand()s and the player and NPC are now hitting for different amounts each...
-
October 10th, 2013, 12:59 PM
Thanks for the tips. I've gotten rid of the battle class, and just changed it to a function. I have a question for a 'bug' that I'm not quite sure how to fix.
During battles, the player and npc will...
-
October 8th, 2013, 05:37 PM
I meant that you would be passing name() by reference as opposed to by value.
Anyway, I tried to take the advice and went and attempted to re-make the game from a more Object-Oriented mindset,...
-
October 8th, 2013, 03:26 PM
Thanks for the link, I'm looking into it right now. From that page, I've gotten into looking at what Pass by reference is.
So what I'm understanding now is that const std::string& must be the same...
-
October 8th, 2013, 10:44 AM
const std::string& name() const { return m_name; }
Can someone help me with this tidbit? I understand that you call the return type, which is std::string, name it(name), and the {...
-
October 7th, 2013, 06:04 PM
Thanks for your criticism, but I have some answers to your questions:
1. I tried initializing my variables with a value, but I believe when I tried doing that, I kept encountering the "crosses...
-
October 6th, 2013, 10:07 PM
Hi, I recently picked back up on C++(and by recently, I mean this morning) after not looking at it for a while. I've never known very much C++, but I've tried to learn before and gave up. However,...
|
Click Here to Expand Forum to Full Width
|