Search:

Type: Posts; User: madgolfertom

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,094

    Thanks...that was a silly mistake on my part. :)

    Thanks...that was a silly mistake on my part. :)
  2. Replies
    2
    Views
    1,094

    Problem with time.h

    #include <time.h>

    time_t plaintime;
    tm *ptm;

    time(&plaintime);
    ptm = localtime(&plaintime);
    if (ptm.tm_hour >= 0 && ptm.tm_hour <= 4)
    {cout << "A special message!...";}
  3. Replies
    9
    Views
    1,547

    Well, I'm sorry I haven't got back to you guys in...

    Well, I'm sorry I haven't got back to you guys in a while...thanks for the quick response!

    I used Hunter's method with resize(). I don't really care about great performace, but thank you all for...
  4. Replies
    9
    Views
    1,547

    Limit to text string?

    getline(cin, name);

    Is what I use to get the string name. I'd like to make the program limit the name to eight characters or less, truncating the name if it's too long. I'm a bit of a newbie, help...
  5. Replies
    3
    Views
    1,075

    Wow! Thank you very much, that's exactly what I...

    Wow! Thank you very much, that's exactly what I need!
  6. Replies
    3
    Views
    1,075

    Is there a way to get the time?

    Is there a way for my program to take the time from the user's computer clock and store it into some sort of variable? I'd like to put a bonus in my game program for somebody using it in the wee...
  7. Replies
    9
    Views
    1,602

    That worked great. Thank you very much, and sorry...

    That worked great. Thank you very much, and sorry for blowing a simple question out of proportion.
  8. Replies
    9
    Views
    1,602

    I thought that might be the problem. I have...

    I thought that might be the problem. I have Bloodshed Dev-C++ Version 4.
  9. Replies
    9
    Views
    1,602

    Still doesn't work. Does fixed have to be the...

    Still doesn't work. Does fixed have to be the first thing right after cout? I'll try tinkering around a bit.
  10. Replies
    9
    Views
    1,602

    Oh wow. Thank you very much. I was putting fixed...

    Oh wow. Thank you very much. I was putting fixed AFTER setprecision. I guess my book is a little out of date. :D

    Actually it didn't work. I get an error that says fixed is undeclared and it says...
  11. Replies
    9
    Views
    1,602

    Having problems representing money

    This is a very amatuerish question, but no matter what I try, there is no flexibility with setprecision when it comes to me wanting just two places beyond the decimal. When I use setprecision(2) and...
  12. Replies
    3
    Views
    3,999

    Thanks very much. I looked around but I guess I...

    Thanks very much. I looked around but I guess I did a bad job. I was looking for a complete explanation and you supplied me with one. Thanks for the quick response! :)
  13. Replies
    3
    Views
    3,999

    How does one save variables to a file?

    I have several variables in a program of mine that I would like to be able to save to a file, exit the program, then recall the data at request another time the user runs the program. Basically to...
  14. Replies
    6
    Views
    1,210

    Thank you so much for the help! I'll look into...

    Thank you so much for the help! I'll look into it. I found another way around it since the enemies in my game would be too generic with the same pattern of behaviors. I will look at the string class...
  15. Replies
    6
    Views
    1,210

    I'm afraid I've tried that already. I get a...

    I'm afraid I've tried that already. I get a compiling error--the array sizes are missing.
  16. Replies
    6
    Views
    1,210

    Help with Char Arrays in my game

    int enemyNumber = 1;
    char enemy[] = "Dragon";
    int enemyHealth = 500;
    int enemyMagic = 0;
    int enemyAttackMin = 50;
    int enemyAttackMax = 60;
    char enemySpell[];
    int...
Results 1 to 16 of 16