Search:

Type: Posts; User: Shamino

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    1
    Views
    27,011

    Okay, so, working through this tutorial, hoping...

    Okay, so, working through this tutorial, hoping someone here can give me a better understanding of what code I'm ripping from the tutorial and mashing into my own setup..

    First thing I added was...
  2. Replies
    1
    Views
    27,011

    Starting out with DirectX

    So, my simple (not actually simple) goal is to create a junky pong game. I'm not really interested in a third dimension (3d) yet, but I was questioning whether or not to bother with ortho view or...
  3. Replies
    2
    Views
    5,370

    For my first trick, try to reproduce whatever the...

    For my first trick, try to reproduce whatever the heck I was doing right 13 years ago:

    Collision testing and response, for all active objects, in one function
    ...
  4. Replies
    2
    Views
    5,370

    Been a while CProgramming.com!

    What is it like 12 years later now and I was able to log in here like it was yesterday?

    I'm starting to get old...

    Time to start programming again!
  5. This sounds way more fun to do than all of the...

    This sounds way more fun to do than all of the other suggestions. I can just figure a way to send a stringstream to the ofstream, and create the stringstream from the data members in the employee...
  6. Well, I do not want to use a text file because...

    Well, I do not want to use a text file because ultimately I want my code to be a bit more re-usable.

    And honestly boost seems to be the best thing for this, as it is minimally intrusive, as I've...
  7. Do I really need to install boost to do...

    Do I really need to install boost to do serialization, isn't there a standard?
  8. Like this? class employee { public:...

    Like this?




    class employee
    {
    public:
    employee(std::string, float);
    const std::string& get_name();
  9. Reconstructing a vector saved in a binary file..

    I've stumbled on this little example: vector::reserve - C++ Reference

    What I'm trying to do is stick a bunch of employee objects in a vector, save it to a file, and load the file and use the...
  10. Replies
    22
    Views
    9,960

    I think I'm getting ahead of myself, I need to...

    I think I'm getting ahead of myself, I need to simply streamline my functions for managing a vector of employees. I can't worry about making a generic object database that is super ooped up and all...
  11. Replies
    22
    Views
    9,960

    Ohhh, I see. Would it be a bad idea to...

    Ohhh, I see.

    Would it be a bad idea to overload an edit function that is in a class called interface?
  12. Replies
    22
    Views
    9,960

    I would have to relearn how to overload functions...

    I would have to relearn how to overload functions D:

    could you give me an easy example?
  13. Replies
    22
    Views
    9,960

    Well here's the thing, I think. If I take edit...

    Well here's the thing, I think.

    If I take edit out of employee, then some other system needs to have edit.

    And if another system needs to have edit, it needs to know how to edit whatever we...
  14. Replies
    5
    Views
    5,639

    Okay, so right now, menu handles the object...

    Okay, so right now, menu handles the object itself, but interface needs to remember where it is in the program.

    For instance, begin the program with a context menu which allows us to get...
  15. Replies
    5
    Views
    5,639

    #include #include #include...

    #include <vector>
    #include <string>
    #include <sstream>
    #include <iostream>
    using namespace std;

    class Menu
    {
    public:
    void display_options()
  16. Replies
    5
    Views
    5,639

    I want something like this: ...

    I want something like this:

    interface.generate_menu()
    Menu.add_context(object.get_context())

    Menu.display_content();
    Menu.get_input();
    Menu.execute_selection();

    Ultimately:...
  17. Replies
    5
    Views
    5,639

    Maybe I could use a class, which has generic...

    Maybe I could use a class, which has generic responses, like cancel, exit, or what have you.

    And use overloaded operators to add choices, Hmmmm.... The wheels are turning.

    Perhaps I would need...
  18. Replies
    5
    Views
    5,639

    Menu Selections in a command prompt

    I'm looking for an alternative solution to this mess:


    int main()
    {
    int selection;
    string input;
    bool goodinput = false;
    bool programexit = false;
  19. Replies
    22
    Views
    9,960

    I've made some adjustments according to the...

    I've made some adjustments according to the responses to the thread, thanks for your input everyone!

    Employee.h:



    #ifndef EMPLOYEE_H
    #define EMPLOYEE_H
    #include <string>
    using namespace...
  20. Replies
    22
    Views
    9,960

    Lol Elysia, I don't know the difference between...

    Lol Elysia, I don't know the difference between employee* and *employee, I may have at one point.

    I'm not sure if polymorphism would really be applicable in this project, simply because of it's...
  21. Replies
    22
    Views
    9,960

    Employee is a struct, that I think I will make a...

    Employee is a struct, that I think I will make a class. Elysia, in my vector of employees should i store employee or *employee. Should I let the vector construct manage my memory in the heap?

    If...
  22. Replies
    22
    Views
    9,960

    That's just my way to differentiate between local...

    That's just my way to differentiate between local variables and passed variables, any other suggestions for that?
  23. Replies
    22
    Views
    9,960

    Also, I'm wondering... I want to put my...

    Also, I'm wondering... I want to put my functions that edit and create employees in a single header. Should I wrap them in a class, what would I call it? What would I call the header?
  24. Replies
    22
    Views
    9,960

    Assert: When to and when not to.

    void edit(employee * _employee)
    {
    assert (_employee !=NULL);
    printf ("%d\n",*_employee);
    string input;
    int selection;
    bool goodinput = false; //loop conditional, input must match...
  25. Replies
    10
    Views
    1,325

    employee* get_employee(string _name) { for...

    employee* get_employee(string _name)
    {
    for (unsigned int i = 0; i < employees.size();)
    {
    if (_name.compare(employees[i]->name) == 1)
    {
    return employees[i];
    }
    else
    {
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4