Search:

Type: Posts; User: guest

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    1,440

    thanks for the warning of the memory leak, didn't...

    thanks for the warning of the memory leak, didn't notice... that's the reason why such code would never be possible to write in an exam, to long and complicated to write.
  2. Replies
    11
    Views
    1,440

    yes i did not took to account the difference of...

    yes i did not took to account the difference of big and small letters, let's say i would it's not complicated, also final result isn't returned and from the question it isn't implied that it should...
  3. Replies
    11
    Views
    1,440

    thanks , although we didn't learned the functions...

    thanks , although we didn't learned the functions isalpha and upcase (or any other from ctype.h) i'll try to write it without using them. and see the result
    thanks!
  4. Replies
    11
    Views
    1,440

    problem with to long solution to exam question

    hi, i have C exam next week, so i started solving questions from previous years exams and run into this question, the answer i come up to is far far from having reasonable length, it's too...
  5. Thread: c++ help

    by guest
    Replies
    5
    Views
    883

    in your first version declare an int called...

    in your first version declare an int called totalSeats and intialize to zero outside the loop. Inside the loop increment totalSeats by seats each time through the loop. Output totalSeats only after...
  6. Replies
    3
    Views
    857

    instead of cin.getline(infob, '\n) ;//what is...

    instead of

    cin.getline(infob, '\n) ;//what is infob?? you never declare it.

    it should be

    new_name.getline(age, 255, '\n')

    or
  7. Thread: fscanf

    by guest
    Replies
    3
    Views
    1,437

    lets assume that the file is set up like thiS:...

    lets assume that the file is set up like thiS:
    12345,ASDFG,FRT,A-,A-,A,B+,A-,F,D-,F,AB-,AB-,AB-,AB-
    22222,etc.

    Thus it is has the requisite fields and is comma delimited. If that's the way the...
  8. Thread: array program

    by guest
    Replies
    6
    Views
    997

    if the value of key is found in the array passed...

    if the value of key is found in the array passed in then the value of key which equals array[i] is returned and the function stops without the second return statement ever being reached. If the...
  9. Replies
    1
    Views
    725

    The functions you need are probably not all that...

    The functions you need are probably not all that difficult. The problem is figuring out the algorhythm to use first. Forget about writing code to begin. Set things up so you can work start solving...
  10. Replies
    6
    Views
    1,792

    instances of the string class cannot be null, but...

    instances of the string class cannot be null, but they can be empty. in your constructor try this:

    bookmarks::bookmarks()
    {
    int i;
    for(i = 0; i < size; i++)
    {
    url[i] = "";
    title[i] = "";
    }
  11. Thread: array program

    by guest
    Replies
    6
    Views
    997

    I would encourage you to write out in english...

    I would encourage you to write out in english what it is you are trying to do before you try to write code for the process. Here's and example.

    This problem will accept user input of 20...
  12. Replies
    1
    Views
    942

    you can't increment a constant like 4 or 21 or...

    you can't increment a constant like 4 or 21 or 0.89. therefore

    sales *= 4++;

    doesn't compute. However

    sales *= 4;

    expands to
  13. Thread: 2d array help!

    by guest
    Replies
    2
    Views
    1,417

    Here's an algorhythm that relates how I would try...

    Here's an algorhythm that relates how I would try solving this problem

    develop function to check for valid move (so don't overwrite array)

    develop function to display pad

    develop function to...
  14. Thread: Money classs

    by guest
    Replies
    5
    Views
    1,615

    from a logic standpoint you have declared total...

    from a logic standpoint you have declared total to be of type long, which is an integer value. Then, in the 2 argument constructor you assign the value of cents (defined as type int) divided by 100...
  15. Replies
    7
    Views
    1,172

    I haven'tcompiled and ran the program, but it...

    I haven'tcompiled and ran the program, but it should work fine without recursion. Liberty is a fine author in my opinion. Read on!
  16. Replies
    3
    Views
    1,921

    I hear there is a permutation function in the...

    I hear there is a permutation function in the STL. Alternatively you can write one of your own using a set of nested loops.
  17. Replies
    5
    Views
    962

    You're welcome to try these ideas, some may work,...

    You're welcome to try these ideas, some may work, others may not.

    1) add line: #include <iostream> in main program.


    2) +/-: delete the line #include <iostream> in MailingLabel.h

    3) +/-:...
  18. Replies
    7
    Views
    1,172

    #include #include int ...

    #include<iostream.h>
    #include<math.h>
    int main()

    {
    int number=0,
    x=0,
    power=0,
    ans=0;
  19. Replies
    4
    Views
    832

    instead of '\0' how about using -1 or -999 or...

    instead of '\0' how about using -1 or -999 or some other number not expected in the arrray? I would be careful about putting a char into an int array as the compiler may well convert the char to...
  20. Thread: telephone string

    by guest
    Replies
    3
    Views
    940

    strtok returns a char * which is different from a...

    strtok returns a char * which is different from a char [] although both can be used to represent a string. The compiler says it can't find a prototype to convert the rhs to the left. I would try...
  21. Replies
    12
    Views
    1,092

    Compiled my last bit of code. Works as promised....

    Compiled my last bit of code. Works as promised. Continue to read replies. Continue to learn. Thanks for expanding my horizon.
  22. Replies
    12
    Views
    1,092

    You're standing my world on it's head! Not that...

    You're standing my world on it's head! Not that I haven't had similar experiences before, but still.

    In review for my benefit and your critique. Given:

    char * ptr;

    //the following won't...
  23. Replies
    12
    Views
    1,092

    I love to learn new things. This may be yet...

    I love to learn new things. This may be yet another opportunity.

    This I knew was acceptable:

    char * ptr1;
    char * ptr2;
    char ch = 'A';
    ptr2 = &ch;
    ptr1 = ptr2;
    cout << *ptr1;//A is printed...
  24. Replies
    16
    Views
    1,534

    My concerns include: At the end of the...

    My concerns include:

    At the end of the declaration of a class/struct interface there should be a semicolon, so I think the semicolon issue brought up is in error, not the code as written, on that...
  25. Replies
    3
    Views
    788

    almost right, fOul. It is not possible to...

    almost right, fOul. It is not possible to assign a string of char like Jacob to a single char like name as bsb77 wrote. You assign a string of char to a char array (which is often called a c_style...
Results 1 to 25 of 161
Page 1 of 7 1 2 3 4