User Profile

Collapse

Profile Sidebar

Collapse
pdring
pdring
Last Activity: Aug 28 '08, 02:30 PM
Joined: Oct 6 '07
Location: CORNWALL, ENGLAND
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • thanks for replying to my problem,
    the idea behind this project is to declare two classes, guest and room. and make an association between the two classes. the main function is just a way to check that a dynamic object of guest is created within a member function of room class, I have called this allocateGuest() . also, when the guest 'checks out' the dynamic object of guest is destroyed, - deAllocateGuest (). the amount of money owed by each...
    See more | Go to post

    Leave a comment:


  • pdring
    started a topic dynamic objects, agregation and calling member functions
    in C

    dynamic objects, agregation and calling member functions

    hi guys,
    can you look at my main frunction and give me any help on how to get this program to work without copying the block of code twice (as in this code).
    I have tryed to put the code into a function and then basically called it twice but the updateBill member function does not work correctly ( it does when the code is copyed ). i also thought about using a for loop, this works but I then must assume that i want to run this code...
    See more | Go to post

  • pdring
    replied to if statement problem?
    in C
    THANKS !!
    now you have explaned it it does seem obvious, such is the way with these things, they are easy only when you know the answer.
    See more | Go to post

    Leave a comment:


  • pdring
    started a topic if statement problem?
    in C

    if statement problem?

    Hi,
    I wonder if somebody can see my error?
    I would assume that these if statements would be valid only if 'y' or 'Y' is entered, and if any other character is entered the default string declared for the variables would be displayed, however this is not the case! I have looked over this section of code so many times and can not see my error.
    any input would be greatly appreciated.

    Code:
    void main(void)
    {
    ...
    See more | Go to post

  • pdring
    started a topic passing arrays into a structure
    in C

    passing arrays into a structure

    just a quick question...
    can anyone tell me if it is possible to pass info held in an array of a structure to a seperate function? (i am using C)
    thanks
    See more | Go to post

  • pdring
    replied to assignment from hell !!
    in C
    Thankyou very much for your help, I have a working program at last!!!
    (why do things seem obvious when you have the answer !)
    My course is moving on to C++ next, so I guess I will be scanning the archives of this forum pretty soon.
    Thanks again,
    Phil Cornwall (England)....
    See more | Go to post

    Leave a comment:


  • pdring
    replied to assignment from hell !!
    in C
    Thanks, I have been trying to fix my problem and got a little further, but now the values are not showing at all !!

    Code:
     for (count = 0;count <noEmployees; count++)
              do
              {
             printf ("%s\nPlease enter the tarrif code:\t",employee[count].name);
             scanf("%d",&tarrifCode);
             printf ("\nnumber of contracts negotiated for this tarrif:\t");
    ...
    See more | Go to post

    Leave a comment:


  • pdring
    started a topic assignment from hell !!
    in C

    assignment from hell !!

    Hi everybody,
    I have compleated an assignment in C for college and was very pleased with myself until I saw that extra marks could be obtained by modifiying the working program to meet a new criteria.
    at present the program excepts an integer as 'amount of contracts sold' for each of 5 employees, the employees are defined in a structure with all the information set out in the assignment brief.
    the program then (via 'for loops'),...
    See more | Go to post

  • pdring
    replied to sorry, another newbie question on loops!
    in C
    Thanks for your help. it has solved my problem,
    Phil...
    See more | Go to post

    Leave a comment:


  • pdring
    started a topic sorry, another newbie question on loops!
    in C

    sorry, another newbie question on loops!

    Hi guys, sorry but yet another newbie struggling with the basics!
    I have a small program that i am working on in wich 1 want to enter exam scores for each of 5 students in turn untill i enter a set number to stop the loop and carry on with the program, the loop i have come up with is bellow but it keeps going and ignores my set number, can anyone shed any light on this problem loop??

    [HTML]while ( score[count]!= -999)
    ...
    See more | Go to post

  • pdring
    replied to Loop not working in assignment
    in C
    Thankyou so much, I have now learned to look over the basics before trying to find complicated answers!!...
    See more | Go to post

    Leave a comment:


  • pdring
    replied to Loop not working in assignment
    in C
    Hi, thanks for replying. first I have inserted the for loop that does work for each employee:
    Code:
    for (count = 0;count <noEmployees; count++)
              {
               if (employee[count].totalContracts > 5)
                    totalPay =  employee[count].totalContracts + 100;  /* bonus £100 for over 5 contracts*/
    
              totalPay = employee[count].basicPay + (employee[count].totalContracts * 25); /*bonus
    ...
    See more | Go to post

    Leave a comment:


  • pdring
    started a topic Loop not working in assignment
    in C

    Loop not working in assignment

    Hi everyone,
    I have had a look through the site but can't find anything to help with a little problem i am experiencing with a college assignment. I wonder if anyone would like to help out?

    My assignment is : the program should prompt the operator to enter the number of contracts negotiated this week.
    After all data has been entered, the program should display the following information for each employee:
    Number...
    See more | Go to post

  • pdring
    replied to Borland vs Xcode
    in C
    Thanks for you help on this subject, I have found a solution although not ideal it works! To combat portability issues etc. I have installed the borland compiler on my p.c at work and set up a remote access for my mac, this way i can sit at home on my mac and have the benifits of borland on windows.
    bit of a cheat but like i say it works!...
    See more | Go to post

    Leave a comment:


  • pdring
    started a topic Borland vs Xcode
    in C

    Borland vs Xcode

    Can anyone help??
    I have just started a C / C++ course at my local college and they use borland c++ builder 5, I use an imac at home and have downloaded xcode as my c++ compiler, it works beatifully but now I find out that borland 5 uses different code to the ANSI standard that xcode can compile, is their an easy conversion / program so that I can write and compile borland in xcode or am I wishing for the impossible? any help or alternative...
    See more | Go to post
No activity results to display
Show More
Working...