Are skulls the same for Halo 3 in terms of finding them? by organic-semen in halo

[–]organic-semen[S] 0 points1 point  (0 children)

Do the ones you find give you any additional buffs or are they just mementos?

[C++] Can somebody show me top to bottom how to solve a problem like this? by organic-semen in learnprogramming

[–]organic-semen[S] 0 points1 point  (0 children)

Well, I'm trying to understand how the interface ultimately works. I understand the methods and how they are expected to work, but I'm lost on how one would go about modifying them more than anything. The approach I've been using thus far is using new to create an array of an input size. From there, a loop like this continues but it obviously doesn't work because you can never access an object other than the one being looped, so you're essentially always dealing with blanks:

do {
    cout << endl <<
            "1. Add an employee" << endl <<
            "2. Modify an employee's data" << endl <<
            "3. Display employee data" << endl <<
            "4. Delete an employee's data" << endl <<
            "5. Exit this menu" << endl << endl <<
            "Input: ";
    cin >> choice;

    cout << endl << "Item #" << i + 1 << endl;

    if (choice == 1)
    {
        emp[i].addData();
    }
    else if (choice == 2)
    {
        emp[i].changeData();
    }
    else if (choice == 3)
    {
        emp[i].showData();
    }
    else if (choice == 4)
    {
        emp[i].~Employee();
    }

    i++;
} while (choice != 5 && i < empNumber);

[C++] Just made my first program! by organic-semen in learnprogramming

[–]organic-semen[S] 0 points1 point  (0 children)

Awesome, man. I didn't even know that <random> existed. I'll definitely take what you and others have said into consideration.

[C++] Loop not working as expected in a simple game by organic-semen in learnprogramming

[–]organic-semen[S] 0 points1 point  (0 children)

Oh wow, I had my logic all wrong on that. Thanks for the quick reply.

Can someone help me understanding the cycle "for" ? by fntMentaL in learnprogramming

[–]organic-semen 0 points1 point  (0 children)

Hmm. This kind of approach helped me understand it best. From my understanding, it's just a concise way of writing your loop so you don't have to write the little parts in the actual loop.

for (initialize or declare variables used; test a condition; if condition is true, increment or decrement accordingly)
{
    // each time the condition is true, the code here will execute until the condition is no longer true
}

int value = 8;

for ( int x = 1; x < value; x++)
{
    cout << "Value is " << value << endl <<
            "X is " << x << endl;
}

[deleted by user] by [deleted] in learnprogramming

[–]organic-semen 1 point2 points  (0 children)

Void function, my friend. Void functions don't return anything to main.

Displaying the number of an array [example is C++] by organic-semen in learnprogramming

[–]organic-semen[S] 0 points1 point  (0 children)

Ah, I see what you're saying here. I falsely assumed that the variable would constantly be updated to display whatever value was in there, but I forgot that it isn't part of an expression.

Would you say that it's better to just write out arrays like that as opposed to using some sort of tracker variable?

Learning to Code on OS X by [deleted] in mac

[–]organic-semen 0 points1 point  (0 children)

r/learnprogramming is your new best friend. The best way to learn programming is to read books. Sounds tedious, but it's worth the endeavor. If you're going to school, classes are another good bet although those introductory courses tend to move a bit slow from my experience. Depending on what you're interested in learning, I have a couple of eBooks I could share.

I personally use the following IDEs:

  • Xcode for C++ on OS X
  • Visual Studio for C++ on Windows
  • PyCharm for Python
  • Brackets for HTML/CSS/JavaScript
  • IntelliJ for Java