Search:

Type: Posts; User: Bash

Search: Search took 0.00 seconds.

  1. Thread: Creating a class

    by Bash
    Replies
    4
    Views
    1,062

    All we have is this: class DynamicFraction...

    All we have is this:



    class DynamicFraction
    {
    public:
    //Filling in Constructors and Destructors; Proper getters and setters; Required utilities and operator functions

    private:
  2. Thread: Creating a class

    by Bash
    Replies
    4
    Views
    1,062

    Creating a class

    So I'm new to this whole class thing. My prof gave me a main function and asked us to derive class defenitions and stuff. Main is as follows:


    int main( void ) //do not change or modify this...
  3. Thread: Linker Error

    by Bash
    Replies
    13
    Views
    1,595

    OOOOH. That worked. :D But what if I wanted to...

    OOOOH. That worked. :D

    But what if I wanted to do the same thing by calling compare(); as a non-member function?

    Edit: just read what swoopy said. Be back after going over mah code.

    Edit2: I...
  4. Thread: Linker Error

    by Bash
    Replies
    13
    Views
    1,595

    So where would I add "iZ = frA.compare (frB);" in...

    So where would I add "iZ = frA.compare (frB);" in the second program? I added it just before "iZ = compare (frA, frB);" and it didn't work
  5. Thread: Linker Error

    by Bash
    Replies
    13
    Views
    1,595

    Sorry about that, CornedBee. My error: ...

    Sorry about that, CornedBee.

    My error:

    Linking...
    cis25Fall2007AmolMundayoorPostlabEx1.obj : error LNK2001: unresolved external symbol "public: int __thiscall Fraction::compare(class...
  6. Thread: Linker Error

    by Bash
    Replies
    13
    Views
    1,595

    So I've been working with classes for a while....

    So I've been working with classes for a while. After fiddling around, I came up with two instances of code that pretty much did the same thing. I wanted one to be using a member function and the...
  7. Replies
    42
    Views
    3,911

    It does indeed clarify a lot. But I still have a...

    It does indeed clarify a lot. But I still have a couple more questions...

    1) Shouldn't

    int &a = b; // a references b.
    be

    int a& = b; // a references b.

    2) If I swap the address of...
  8. Replies
    42
    Views
    3,911

    I know that the "*" is a dereferencing thingy,...

    I know that the "*" is a dereferencing thingy, and this is how I think about it:



    Is that a wrong way to think about it?

    And for the first one:
  9. Replies
    42
    Views
    3,911

    I see =) Thanks for all the input. I've been...

    I see =) Thanks for all the input.

    I've been reading about pointers, and there's something that has been bothering me and driving me nuts. What exactly does a pointer point to? To the address in...
  10. Replies
    42
    Views
    3,911

    OH! should I have to write it like so: ...

    OH!

    should I have to write it like so:


    (a>b),(c>d)

    @Daved: You mean cout outside of the ternary operator? Can you give me an example? :(
  11. Thread: lots of freeware

    by Bash
    Replies
    60
    Views
    233,643

    Sticky: I personally LOVE Notepad++...

    I personally LOVE Notepad++
  12. Replies
    42
    Views
    3,911

    Is there a way I can sort 3 integers using only...

    Is there a way I can sort 3 integers using only the ternary operator and the usual <, <=, >, >=, ==, != ? My prof wants it for 4 integers, but I can't seem to figure out how to compare 3 digits with...
  13. Replies
    42
    Views
    3,911

    Well my trouble is I just don't know what exactly...

    Well my trouble is I just don't know what exactly those void swap( ); thingy does. If used correctly, what is it supposed to do?
  14. Replies
    42
    Views
    3,911

    Well our prof had asked this question in class: ...

    Well our prof had asked this question in class:

    (1) Given that the following prototypes are given in some program. What would and may be potential problems from each of the following function...
  15. Replies
    42
    Views
    3,911

    Sorry for the late reply :). It'll be my pleasure...

    Sorry for the late reply :). It'll be my pleasure to post it here.


    #include <iostream>
    #include <string>
    #include <limits>
    using namespace std;

    int main ()
    {
  16. Replies
    42
    Views
    3,911

    Oh man, I ran into so much trouble trying to come...

    Oh man, I ran into so much trouble trying to come up with solutions as to why I couldn't just copy paste your code. Copy pasting is baaaaad, but in the end a lot of good came off of it as I knew more...
  17. Replies
    42
    Views
    3,911

    matsp, I'm sorry to say that what you said went...

    matsp, I'm sorry to say that what you said went way off the top of my head :p

    After a lot of googling, I came across this code chunk, but I've bolded and underlined parts that I don't get:

    ...
  18. Replies
    42
    Views
    3,911

    I still haven't figured out the n-digit part, but...

    I still haven't figured out the n-digit part, but I'll take care of it later. I was attempting to modify the program even more, for example, giving feedback when you enter a float I want my program...
  19. Replies
    42
    Views
    3,911

    That's interesting, because I've never come...

    That's interesting, because I've never come across a for-while loop before.

    What if I wanted my program to accept an n-digit integer instead of a 5-digit integer (I didn't know how to solve it...
  20. Replies
    42
    Views
    3,911

    OHHHH, I see what I was doing wrong. After...

    OHHHH, I see what I was doing wrong. After fiddling with the for loop, I couldn't come up with something that actually worked. It's kind of a bummer to me that my for loop didn't work, but I made a...
  21. Replies
    42
    Views
    3,911

    I was hoping to use iSumDump as a temp value. I...

    I was hoping to use iSumDump as a temp value. I wanted to keep storing the remainders of teh division in iSumDump and keep adding to iSum. For example,

    If the number is 94602, I want iSumDump to...
  22. Replies
    42
    Views
    3,911

    So I have this homework assignment that's due on...

    So I have this homework assignment that's due on Friday, and I had started working on it. Basically what we have to do is accept a number (like 95468) and write a program that outputs the sum of the...
  23. Replies
    42
    Views
    3,911

    Thanks for both the replies, MacGyver and matsp...

    Thanks for both the replies, MacGyver and matsp :) I now have an understanding of it and pray they don't go away.

    About the getline function - can you use it to store a string in an array? For...
  24. Replies
    42
    Views
    3,911

    N00b to C++ here, have some general questions.

    So I've been taking a C++ in school and sometimes it seems like I've to turn to sources other than my prof for help. Hence after some googling, I'm here. Now I have a few questions.

    I've been...
Results 1 to 24 of 24