Search:

Type: Posts; User: Chaplin27

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds; generated 32 minute(s) ago.

  1. Replies
    4
    Views
    1,406

    wow, that is the most subtle bug I have ever...

    wow, that is the most subtle bug I have ever encountered...I was return a copy of the Die object in getItem()...so it was changing the faceVal of the copy and then the original was unchanged. Jesus,...
  2. Replies
    4
    Views
    1,406

    Yeah, I made the Die class, and the function...

    Yeah, I made the Die class, and the function looks like this


    void Die::setFace(int f)
    {
    faceVal = f;
    }

    Thanks for the response by the way :)
  3. Replies
    4
    Views
    1,406

    issue with member functions

    I have a bag:

    class bag
    {
    public:
    // TYPEDEFS and MEMBER CONSTANTS
    typedef Die value_type;
    typedef std::size_t size_type;
    static const size_type CAPACITY =...
  4. Replies
    4
    Views
    1,489

    errors

    here are a few:

    error C2784: 'bool std:: operator ==(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const...
  5. Replies
    4
    Views
    1,489

    typedef question

    Hey everyone,

    I know I should be using templates, but our teacher doesn't want us to modify the code she gave us except for one part.



    class bag
    {
    public:
    typedef ___ value_type;
  6. Replies
    5
    Views
    1,288

    wow

    Fantastic observation, and you have just taught me something new. Thanks a lot! Random question, is it possible to call delete on a modified pointer like this?
  7. Replies
    5
    Views
    1,288

    weird pointer issue

    Hey everyone,
    I haven't programmed in quite some time and was trying to get back into it. So I wrote a small tester program that's already giving me an issue:



    int* arr = new int[10];

    for...
  8. Replies
    5
    Views
    968

    Actually I just have one last question... ...

    Actually I just have one last question...


    char *str = "buzz";
    How exactly does this work? How am I able to assign a string literal to something that should be expecting a memory address?
  9. Replies
    5
    Views
    968

    ah ha! Yes...now I remember! I went over c style...

    ah ha! Yes...now I remember! I went over c style strings a decent time ago and just havent practiced them since then...clearly it's showing in my inabilty to understand this concept. I have down...
  10. Replies
    5
    Views
    968

    char* question

    Hey everyone,
    I typed out some simple code and it confused me:


    #include <iostream>

    using namespace std;

    main()
    {
  11. Replies
    2
    Views
    1,582

    awesome advice lucky...I can always expect some...

    awesome advice lucky...I can always expect some real help when you reply. Thanks (yet again)...what you say about passing the boolean makes perfect sense...I can't believe it made sense to do that...
  12. Replies
    2
    Views
    1,582

    modularization

    Hello,
    I was writing some code that reads a record and selects speific files from that record. Now, I have a function set up to select certain records and then a function within that function that...
  13. Replies
    4
    Views
    1,207

    Modularization question...

    Hello people,
    Choose from the two versions of this post:

    [THE LENGTHY INTRODUCTION]
    So, I'm making some functions, I think I'm real slick, when all of a sudden...WHAM!...
  14. Replies
    17
    Views
    2,470

    I see brain...it makes the most sense...I was...

    I see brain...it makes the most sense...I was just trying to solve it mathematically only, without any containers...just the numbers and myself, man vs. machine!!! Whoa...got a little carried...
  15. Replies
    17
    Views
    2,470

    the problem with that approach vectors is if the...

    the problem with that approach vectors is if the user enters 0003, which is a legal 4 digit number but fails the test your describe...just a random observation. Thanks for the reply everyone, I feel...
  16. Replies
    17
    Views
    2,470

    figuring out size of numbers

    Hey everyone,
    I was curous, without using library functions, how I could go about figuring out how many digits are in a number. I'm doing this to test some user input and print in error message if...
  17. Thread: array design

    by Chaplin27
    Replies
    4
    Views
    953

    array design

    Hey everyone,
    I'm doing the following problem:

    So I was wondering if anyone had any good starting comments, I wrote this whole elaborate program until I realized I was using char as if they were...
  18. Replies
    0
    Views
    4,501

    program design question

    Hello everyone,
    I came across a programming problem that I was wondering someone could help me out with.

    the problem:


    A file of student records contains name, gender (M or F),
    age, and...
  19. Replies
    1
    Views
    3,093

    program design question

    Hello everyone,
    I came across a programming problem that I was wondering someone could help me out with.

    -----------------------------------------------------------------------------------
    the...
  20. Replies
    7
    Views
    996

    hahaha, very good points have been brought up and...

    hahaha, very good points have been brought up and I'm very glad I asked that question. Thanks (yet again) for all the help. Cheers, Chap
  21. Replies
    7
    Views
    996

    questionable logic

    Hey everyone!
    I read this pseudocode in a design book, and I found it bothersome, tell me if this is a good way to program, or if it's better to state the exact conditions of if statement execution:...
  22. Thread: math problem

    by Chaplin27
    Replies
    2
    Views
    3,350

    ok I read the problem wrong, I'm retarded (not...

    ok I read the problem wrong, I'm retarded (not that there's anything wrong with that....must remain PC :p ) that's the way I solved it as well....now I understand the question. Thanks for the help...
  23. Replies
    2
    Views
    1,982

    wow darryl, thanks a lot, I'm an idiot! I didnt...

    wow darryl, thanks a lot, I'm an idiot! I didnt even think of receiving the other data in the loop body! That changes the whole game, haha. Thanks a lot for the help!
  24. Thread: math problem

    by Chaplin27
    Replies
    2
    Views
    3,350

    math problem

    Hey everyone,
    I'm writing this simple program that does a little math, and I felt like I wasnt given enough information. How can I go about figuring out the following problem:



    So the...
  25. Replies
    2
    Views
    1,982

    user input and program design

    Hey everyone,
    I was writing some pseudocode to a very basic program and I was just wondering about something in my design, this is all in pseudocode (obviously :p ):



    int main()
    {
    ...
Results 1 to 25 of 154
Page 1 of 7 1 2 3 4