Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Rizean

@Rizean
About
Posts
11
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Coding Challenge
    R Rizean

    I'm sorry but this is not a challenge. If you want a real challenge go to ProjectEuler.com. There you will find over 350 easy to difficult challenges. I have learned a ton from the site and have only completed 45 problems so far. Wish I had more time to work the problems. Regards

    The Lounge c++ architecture help

  • App Communication via screen reads
    R Rizean

    I am working with World of Warcraft and C#. In WOW there is no way to send data out to another app nor are you allowed to use Spy++ to read data from WOW. A though occurred to me to simply create an Addon that draws a series of colored boxes near the top of the screen away from any that would get in the way of the users use of WOW. These colored boxes would represent a value I would read in via C# screen area capture. My question is, is this the best way to go about something like this or is there a better way?

    C# question csharp

  • Recommendation for Online Colleges offering CS degree?
    R Rizean

    I've been with DeVry for a little over a year now and recently decided that after I graduate I would like to pursue a M.C.S. While looking at the requirements I found out about GRE's. After looking over a GRE practice test I found that DeVry's GSP degree will leave me ill prepared to take the GRE. So now I am looking for a school that has a good CS program that I can take online as I am serving in Korea. While I only have nine months left till I grad from DeVry I'd rather not burn up more of my GI bill on a degree that will not help me get into a masters program.

    The Lounge business help question

  • First programming language for high school students?
    R Rizean

    I'd have to go with C# as it leads in to C++ very easily and I supect he wants to write games. There is nothing better than C# for getting into game development with XNA. They have a whole series of videos for free from MS on game dev with XNA.

    The Lounge c++ question

  • LNK2005 Error...
    R Rizean

    One of my instructors finally got back with me and explained to me what I was doing wrong. "flush_istream" was a function I created to deal with invalid user inputs to cin calls. The function is only five lines long and it is used by a number of other functions. I placed it in its own header files stream_flush.h, but because it was the only function and because it was so short I did not separate the definition and implementation, i.e. no stream_flush.cpp file. However, as you have probably already figured out this caused the error of it being defined multiable times. My instructor suggested I inline the function which did fix the problem, however I'm thinking it would be better to separate the definition and the implementation.

    #ifndef STREAM_FLUSH_H
    #define STREAM_FLUSH_H

    #include <istream>

    //blocking if no data in the stream
    inline void flush_istream(std::istream& in)
    {
    while(in.peak() != '\n')
    in.get();
    }

    #endif

    Thanks all for your help. Being in Korea often leaves me sitting here for up to a day or more sometimes waiting for help. Just one of the challenges of being in the Air Force and going to school online.

    C / C++ / MFC help tutorial

  • LNK2005 Error...
    R Rizean

    employee_template.h

    #ifndef EMPLOYEE_TEMPLATE
    #define EMPLOYEE_TEMPLATE

    #include <iostream>
    #include <string>
    #include "stream_flush.h"

    template <class T>
    void _getInput(const std::string& message, T& result)
    {
    std::cout << message;
    std::cin >> result;
    flush_istream(std::cin);
    if (std::cin.fail())
    {
    std::cin.clear();
    std::cout << "Invalid input!\n";
    _getInput(message, result);
    }
    }

    #endif

    employee.h Just defines the base class and does not include employee_template.h however employee.ccp does. employee.ccp

    #include "employee.h"
    #include <string>
    #include "employee_template.h"

    using namespace std;

    Employee::Employee()
    {
    _getInput<string>("Please enter the employees first name: ", mFName);
    // more of the same
    }

    // _getInput is only used in the default constructor
    }

    researcher.h

    #ifndef RESEARCHER_H
    #define RESEARCHER_H

    #include "employee.h"
    #include <string>
    #include <fstream>

    class Researcher: public Employee
    {
    public:
    Researcher();
    Researcher(/* lots of stuff here */);
    // more of the same
    };

    #endif

    researcher.cpp

    #include "researcher.h"
    #include <string>
    #include <fstream>
    #include "employee_template.h"

    using namespace std;

    Researcher::Researcher():Employee
    {
    _getInput<string>("Enter the researcgers school: ", mSchool);
    // more of the same
    }
    //more of the same
    };

    I hope this helps and if you need more let me know. BTW, is there a way to cut and paste on Codeproject? Edit: Errors from learning to post on CP... :wtf:

    C / C++ / MFC help tutorial

  • LNK2005 Error...
    R Rizean

    No, all the header files have #include guards, which is part of my confusion as I thought they were suppose to stop this kind of thing from happening.

    C / C++ / MFC help tutorial

  • LNK2005 Error...
    R Rizean

    Hello all, While working on an ungraded project for class I came accross a LNK2005 Error which while I have been able to work around, I would like to know how to do it correctly. The project is to create an employee data base that has an employee class with child classes. That's the jest of the project. Employee - base class -Researcher - child class -Engineer - child class -Manager - child class Now the above four classes all include employee_template.h which defines a template function called void _getInput(std::string& message, T& result). Now the file containing function _getInput include stream_flush.h. Inside of stream_flush includes a function called flush_stream. The problem I am running into is that Employee and it's three child classes all include "employee_template.h" to get the function _getInput which include stream_flush.h to get the function flush_stream which is what generates the errors. engineer.obj : error LNK2005: "void __cdecl flush_istream(...) already defined in employee.obj I was able to get around the error by using the linker command line option: /FORCE:MULTIPLE but I am assuming this is not the right way.

    C / C++ / MFC help tutorial

  • Nine year anniversary
    R Rizean

    Religion is a funny thing. We started out with me being religious and her not, then she became religious, then somewhere along the way I stopped being religious. First piece of advice, spend some time apart, the longer the better but not to long. Second, piece of advice, be careful when you come back together, this is when most babies are made in the military. Twelve years of military and nine years of marriage and some how we have made it this far with only a few bumps. ;)

    The Lounge question com

  • Hiring Graduates
    R Rizean

    I'm in a Game and Simulation Programming course right now and so far I have taken 12 classes 2 of witch had to do with coding and 2 of witch had to do with Game Design. The coding classes were an introduction and OOP both in C# our next coding class will change over to C++. I though the coding classes were a joke but apparently a lot of people in my classes have struggled. I have worked hard to maintain a 4.0 though I'm not sure how valued it will be by employers. In defense of the program I am taking, only 10 of my remaining classes are not Math/Programming related and 4 of the 12 classes I have taken were math. Either way I have learned a lot from my course of study and do realize that they teach you ideally this is the way it works. Having worked in the real world for 12 years now, I can say ONCE out of a thousand or so jobs was any job I have ever done ideal. Btw, thanks to all who have posted about what I should expect as a graduate.

    The Lounge csharp java php database sql-server

  • Hiring Graduates
    R Rizean

    Interesting thread as with in a year or so I will be that "Graduate" looking for a job. Lot of good info here and I understand where a many of you are coming from as I've used some of the same tatic's with new people to my shop. I currently am the Asst-Manager of a 22 man Telephone shop for the Air Force. Going to be interesting going from knowing what I'm doing to only thinking I know what I'm doing. :)

    The Lounge csharp java php database sql-server
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups