Ryuhphino's Profile User Rating: -----

Reputation: 0 Apprentice
Active Posts:
25 (0.01 per day)
05-March 11
Profile Views:
Last Active:
User is offline Sep 30 2015 01:07 PM

Previous Fields

Dream Kudos:
Icon   Ryuhphino has not set their status

Posts I've Made

  1. In Topic: simple work hours project issue

    Posted 28 Aug 2015

    View Postjimblumberg, on 28 August 2015 - 07:51 AM, said:

    What do you mean by "it breaks"?

    By the way the following may be part of your problem:

       int numberofemployees;
       int employee[numberofemployees][4];

    First you are using numberofemployees uninitialized, second array sizes must be compile time constants in C++. I suggest you consider using std::vector instead and you should also see about increasing your compiler warning level, it should be able to help you solve problems like this.


    this actually helped a lot. I tried a different compiler and it worked just fine. I'll look at cleaning it up so I can get it to run on any compiler. Thank you!
  2. In Topic: simple work hours project issue

    Posted 28 Aug 2015

    an example of the issue i'm facing is when I put the numbers in for one employee, ex. $8/hr and 40 hours per week, or even 45 per week, the loops process as intended and give me a correct mathematical answer (i've double checked to make sure), however if i enter for TWO employees the program processes normally until the calculation two dimensional array, in which case instead of giving me the proper amount per week and a monthly total, i get no out put, and the program ends. I'd like for it to be able to process any number of employees, rather than just 1. Thank you!
  3. In Topic: Creating an array within class problem

    Posted 25 Jun 2014

    I have been reading more up on vectors and I have a little better understanding with them, but I'm still running into a problem initializing these values.
    const int NotesInScale = 49;
    const double A440 = 440.0;
    const double TwelthRootOfTwo = pow(2, 1/12.0);
    class Scales
    	//all Major Scales
    	vector <double> Notes[NotesInScale];
    		//All Major Note Frequencies
    	for (int i=0;i<=49;i++)
    		double x = -12;
    		Notes[i] = pow(TwelthRootOfTwo, x) * A440;

    From everything I've been reading and where my error message is, my error is on how i'm trying to add the element to the vector, line 18. Through the formula I have here, I should be able to store into my vector all of the frequencies between C3 to C7, which is about the range i'm looking for.

    Also, any suggestions on vector tutorials would be appreciated as well. I read a few (two on DIC) so I may just need time fooling with it. Thanks again.
  4. In Topic: Creating an array within class problem

    Posted 24 Jun 2014

    Thanks for the quick reply from everyone. I never touched on std::array or std::vector because, honestly, i never was taught ever to mess with them much. It looks a lot simpler though so I will definitely put in some time with those.

    Also the idea of going more mathematically through creating the frequencies, although is a different approach, seems like an easier one. I had never actually looked up how those frequencies were obtained, but now that I have, I could easily just run a loop set on a scalar model (whole whole, half, whole whole half kind of idea) and just have the iterator pump the power as I need (it can just be a variable).

    I'll try to have something tomorrow to hopefully fix the problem. Thanks for all the responses.
  5. In Topic: Sorting numbers through pointers

    Posted 5 May 2014

    I actually started this program a while ago and left it alone as I did other things, and I realized you're completely correct. That initial for loop is incorrect. I'll have to work on that a moment and make sure it outputs the correct data before I move on. I'll post more once It is all done. Thank you!

My Information

Member Title:
New D.I.C Head
Age Unknown
Birthday Unknown

Contact Information

Click here to e-mail me


Ryuhphino hasn't added any friends yet.


Ryuhphino has no profile comments yet. Why not say hello?