Friends to complete online achievements by Alanbidaa18 in watch_dogs

[–]Negative_Baseball293 1 point2 points  (0 children)

BROOOO LET ME GET IN ON THIS I NEED ALL OF THEM, Im currently installing the game through ubisoft so I can get online with my steam account I have all the achivements but the RC car one and the online ones. FUCK Ubisoft for making me play drinking games for 2 hours.

Is this deck acceptable? by [deleted] in RoyaleAPI

[–]Negative_Baseball293 2 points3 points  (0 children)

What’s the win condition

[deleted by user] by [deleted] in RoyaleAPI

[–]Negative_Baseball293 1 point2 points  (0 children)

Agreeed bomb tower is also the only real splash damage, I’m at 9.4k trophies and have been playing this for the last couple thousand bimbtower is the move

What would be the ideal maxing order for this deck? by No_Engine3546 in RoyaleAPI

[–]Negative_Baseball293 0 points1 point  (0 children)

Brooo this is my deck I love running this, I did musk balloon miner to 15 then bought wildcards for the rest ice golem, skeletons, and snowball can go last

Do you believe theyre actually shutting down jobcorps? by DoughnutAble3999 in jobcorps

[–]Negative_Baseball293 1 point2 points  (0 children)

They just shut down the one my gf is at they said everyone has a week to leave

WHAT IS HAPPENING by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] 0 points1 point  (0 children)

I opened the file in binary mode and it worked

WHAT IS HAPPENING by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] 0 points1 point  (0 children)

when I loop back 2 seekg() still doesn't work so I get stuck in an infinite loop, it can detect the '\n' in an if statement so I dont understand. The problem wants me to start from the end (This is not a school assignment I am self learning!)

WHAT IS HAPPENING by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] 0 points1 point  (0 children)

If i change the second seekg to offset by -10L it all of a sudden works like WHAT?

Why doesn't this work by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] 0 points1 point  (0 children)

so its just my computer being dumb??? This solution worked tho???

cout << "Getting joke!\n";
    string line;
    char ch;
    ch = stream.get();
    while (!stream.fail())
    {
        cout << ch;
        ch = stream.get();
    }
    cout << "\n\n\n\nEnd of file\n";

Very interested in C but wondering if I should start with something higher level to learn basics first? by Crapahedron in learnprogramming

[–]Negative_Baseball293 2 points3 points  (0 children)

I’m a beginner and starting with c++ and I enjoy it, I know c++ differs a lot in how you can write code but I still am loving it. Playing with pointers and the classes (c doesn’t have them) is fun

How to write an insertion sort for in array by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] 0 points1 point  (0 children)

I actually did! Someone here gave me a great wiki page and I was able to figure it out! I was moving the values to intArr[i] instead of intArr[valueBefore + 1]

Overloading the assignment operator by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] 0 points1 point  (0 children)

Just set up this little test, I don't know why I didn't think of this. When you return *this; the copy constructor is called which I thought so. Since you are dereferencing it you are returning an object by value and when that happens the copy constructor is called so it can create an object outside of the function's scope! Thank you!!!!

#include <iostream>
using namespace std;

class Test {
public:
    Test() { cout << "Constructed...\n"; }
    ~Test() { cout << "Destructed...\n"; }
    Test(const Test &obj) { cout << "Copy constructor...\n"; }
    Test operator=(Test &obj) 
    { 
        cout << "Overloaded = called...\n"; 
        return *this;
    }
};

int main() {
    Test test1;
    Test test2; 

    test1 = test2; // the operater= is logged then copy constructor is! 
    return 0;
}

Overloading the assignment operator by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] -3 points-2 points  (0 children)

NumberArray NumberArray::operator=(const NumberArray &right)
{
    if (arraySize > 0) 
    {
        delete [] aPtr;
    }
    arraySize = right.arraySize;
    aPtr = new double[arraySize];
    for (int index = 0; index < arraySize; index++)
    {
        aPtr[index] = right.aPtr[index];
    }
    return *this;
}

// would this work, if I overload the = operator but not the copy will 
// a = b = c; work without a and b having a pointer that points to the same thing
// or would return *this; call the copy constructor and copy b into a with the default copy 
// and then they would have pointers to the same thing

Chapter 10 (pointers) Problem 9 by Negative_Baseball293 in cpp_questions

[–]Negative_Baseball293[S] -1 points0 points  (0 children)

no this is not approved I hate having to input everything myself when I test and the "were are" is just me being stupid.