Thread: C/C++ Code(s)

  1. #1
    Registered User
    Join Date
    Dec 2005

    Smile C/C++ Code(s)

    Hello everyone,

    For my term project, I need a simple program but I do not know how to write that with my small knowledge about C/C++. I would be very glad to you if you show me the doors. First of all, I have a permutation of numbers (to represent the works), like [1,5,3,7,8,3,4,2,9] and my aim is to compute the total time because these will have time constraints and resource, constraints. It will be like this:
    The program will take work 1 (lets say it needs 5 unit resources and I HAVE 7 UNITS OF RESOURCES TOTAL). Then it will take 5 (lets say resource needed is 4). since I cannot handle both works at the same time it will put the work 5 after work 1 in the time schedule. Then work 3 will be manipulated and lets say it needs 1 unit of resources. then the program will put this work in the schedule at the same time with work 1 since it is feasible. If there is another work like work 7 and needs 1 unit of resource, and also if the work 1 is predecessor of it, it will not be able to be scheduled at the same time with work 1 since it is not feasible but can be scheduled with work 5 since it does not violate the resource and precedence constraints.

    How should I write the code? Can you help me with that?

    ps: I am trying code just like these flash animations. But I need it in the code Code of any of them is a heaven, but codes both of them are something that I can die for!! Please help me...



  2. #2
    ... kermit's Avatar
    Join Date
    Jan 2003
    Man, you need to try some code for yourself first. Then when you are stuck you can post the code here, and someone will help you. Have a look at the board rules regarding homework. You may as well read this too.


  3. #3
    Registered User
    Join Date
    Dec 2005
    So sorry, I didnt read the rules, ok, thanks...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Keyboard Codes
    By joeprogrammer in forum Game Programming
    Replies: 9
    Last Post: 02-22-2006, 07:15 PM
  2. codes
    By IfYouSaySo in forum A Brief History of
    Replies: 34
    Last Post: 11-18-2005, 03:09 PM
  3. action replay codes
    By c++.prog.newbie in forum Game Programming
    Replies: 2
    Last Post: 02-28-2004, 08:47 AM
  4. converting scan codes to ascii codes
    By stupid_mutt in forum C Programming
    Replies: 11
    Last Post: 01-25-2002, 04:06 PM