My best C++ Programs

This is a discussion on My best C++ Programs within the C++ Programming forums, part of the General Programming Boards category; Originally posted by Paro int j[10]; which is much better than: int j1, j2, j3, j4, j5, j6, j7, j8, ...

  1. #106
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    Originally posted by Paro

    int j[10];

    which is much better than:

    int j1, j2, j3, j4, j5, j6, j7, j8, j9, j10;
    actually i think:

    int j[10];

    would mean:

    int j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10;

    wouldnt it?

  2. #107
    Registered User
    Join Date
    Mar 2002
    Posts
    4
    int j[10] has 10 location only
    so it's j[0].....j[9]

  3. #108
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    oh
    i was close

  4. #109
    Registered User Paro's Avatar
    Join Date
    Feb 2002
    Posts
    160
    i was just trying to prove a point guys sheesh
    Paro

  5. #110
    Registered User Paro's Avatar
    Join Date
    Feb 2002
    Posts
    160
    i have a plan to make a sort of TAMOGOCHI type console game...

    it will be pretty basic since i cant do much yet...

    i was thinking of some possibilities...


    like:

    life = 10 + (level * 5);

    maxdmg = lvl*5;
    mindmg = lvl*2;

    chance to miss: 40-(lvl*2);

    and so when i attack it will roll:

    HIGH = 100;
    LOW = 1;

    attack = rand() % (HIGH - LOW + 1) + LOW; (for randomization)

    and if attack is less than chance to miss, i miss...

    if(chancetomiss>=attack)

    so ive got his life and attack sequence set up...

    im thinking of the monster he attacks has a armor class and level1 they have ac10...and when the monsters are higher level...well heres the equation...

    ac = 10 - monsterlvl;

    and their chance to get hit is 100% at ac 10, and 90% at ac 9...

    and the maximum monster lvl will be 9, because level 10 you can hit him LOL

    well anyone else got any ideas to add on?
    Paro

  6. #111
    Registered User Paro's Avatar
    Join Date
    Feb 2002
    Posts
    160
    bleh, trash that idea, im making one on the wheel of time, and it will be just battle sequences and stuff!
    Paro

  7. #112
    Registered User GreenCherry's Avatar
    Join Date
    Mar 2002
    Posts
    65

    Thumbs up Idea

    Thats a good idea Paro, I am in the sames class, but have not tried to go above and beond what was asked of me, i may try to do so. Would you attempt to make some graphics or all text?

  8. #113
    Registered User Paro's Avatar
    Join Date
    Feb 2002
    Posts
    160
    it will have to be all text because i have no idea how to make graphics yet...
    Paro

  9. #114
    Registered User Paro's Avatar
    Join Date
    Feb 2002
    Posts
    160
    i bet it will be a long time before i learn how to use graphics...i wonder how hard it really is?
    Paro

Page 8 of 8 FirstFirst 12345678
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  2. How come Dev C++ cant run some programs??
    By Sephiroth in forum C Programming
    Replies: 41
    Last Post: 09-17-2005, 06:35 AM
  3. Way to get the current open programs displayed?
    By CPPguy1111 in forum C++ Programming
    Replies: 6
    Last Post: 06-22-2005, 01:24 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 04:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21