Search:

Type: Posts; User: Phyxashun

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Not 100% sure on this, without knowing how you...

    Not 100% sure on this, without knowing how you populate the data in Report.DataGridView, but couldn't you make your column titles DataGridView[0, 0]? Or make a separate array just for the column...
  2. Replies
    16
    Views
    3,068

    Thanks for all of your help!

    Thanks for all of your help!
  3. Replies
    16
    Views
    3,068

    Thanks, doing it this way works and is somewhat...

    Thanks, doing it this way works and is somewhat easier to read than the way I had it. I'll just add the static variable for 0xffffff back into the code.



    private void CheckSelectFirework(Point...
  4. Replies
    16
    Views
    3,068

    Pianorain, For some reason, doing it the way...

    Pianorain,

    For some reason, doing it the way you suggest, allows me to select any color.
  5. Replies
    16
    Views
    3,068

    darren78, Those two methods were replaced by...

    darren78,

    Those two methods were replaced by the single method in my last post, precluding the use of if-then or switch.

    Thanks.
  6. Replies
    16
    Views
    3,068

    Is this a technique?: private void...

    Is this a technique?:



    private void CheckSelectFirework(Point point)
    {
    foreach(Firework firework in Fireworks)
    {
    if(PointOverRect(point.X,
    point.Y,
  7. Replies
    16
    Views
    3,068

    Two Separate functions

    I have settled on two separate methods:



    private void CheckSelectFirework(Point point)
    {
    foreach(Firework firework in Fireworks)
    {
    int SelectedColor = SetSelectedColor(firework);
  8. Replies
    16
    Views
    3,068

    I do have to add that this was a quasi-genius...

    I do have to add that this was a quasi-genius solution. I haven't used hex since the days of the Color Computer, so this idea would never have crossed my mind. It took me a little bit to figure out...
  9. Replies
    16
    Views
    3,068

    Got it

    Thanks for the help, below is the "rough draft". Gonna break this stuff down into it's own method for later use. Thanks for the help. May not be pretty, but it works.



    private void...
  10. Replies
    16
    Views
    3,068

    Slowly but surely

    Okay, so I added a static variable to track whether or not a white rocket has been selected. This allows me select all rockets if I have a white rocket selected. This, of course, isn't the solution...
  11. Replies
    8
    Views
    1,909

    This establishes the generally used getters and...

    This establishes the generally used getters and setters, i.e.:



    public int ID { get; private set; }


    is equal to:
  12. Replies
    8
    Views
    137,252

    The particular line you are quoting creates a car...

    The particular line you are quoting creates a car object and adds it to the array object created in the first line..

    All of the car objects will have the same variables, properties and methods...
  13. Replies
    8
    Views
    137,252

    List instead of array

    I personally prefer to use lists rather than arrays.

    Suppose you have this class:



    using System.Drawing;

    namespace MyProgram
    {
  14. Replies
    16
    Views
    3,068

    Logic Problem

    I am having difficulty figuring this problem out. The program (may be familiar out there, from the Linux Format Magazine), it draws 5 randomly colored (red, green, and blue) fireworks on the screen....
  15. Replies
    7
    Views
    1,265

    It depends, are you passing just one integer, or...

    It depends, are you passing just one integer, or double, or are you passing 500,000 integers, or doubles?

    When you pass by value a copy of what your are passing to the function is made in memory....
  16. Replies
    3
    Views
    2,127

    You can get rid of the infinite loop if you make...

    You can get rid of the infinite loop if you make cin the logic test for the while:


    int main ( )
    {
    int value = 0;

    std::cout << "Enter value to pass range of 1 to 100 ( enter -1 "
    ...
  17. Replies
    13
    Views
    22,724

    From what I can tell, after sorting out your...

    From what I can tell, after sorting out your indentation issues, is this:

    in your dofirst() function (which could probably be a default constructor) you set name to "*", after that you load data...
  18. Replies
    153
    Views
    222,712

    Sticky: I'm sure someone already mentioned it, but I have...

    I'm sure someone already mentioned it, but I have rather enjoyed reading Bjarne Stroustrup's book "Programming - Principles and Practice Using C++".

    I have also enjoyed the Dietel books. Color...
  19. Replies
    10
    Views
    1,069

    Do you need all of the data in memory at one...

    Do you need all of the data in memory at one time? If not make a stream buffer for cin, do your logic test and then throw away the data.
  20. Replies
    25
    Views
    2,133

    Because the constructor for an ifstream object...

    Because the constructor for an ifstream object takes a char* as a parameter for the filename.


    ifstream ( );
    explicit ifstream ( const char * filename, ios_base::openmode mode = ios_base::in );
  21. Replies
    25
    Views
    2,133

    Check your function prototype, make sure you use...

    Check your function prototype, make sure you use pass by reference there, also in your function there is no need to declare fptr as an ifstream object; you already did that in your main().


    void...
  22. Replies
    24
    Views
    2,269

    Here is something that I have been using, just...

    Here is something that I have been using, just read everything in with the first function and use the second function to separate the data by column.

    LINE is a global typedef of vector<string>...
  23. Replies
    18
    Views
    1,936

    The easy solution is to use a cast: avgTemp...

    The easy solution is to use a cast:


    avgTemp = (double)sumTemp / (double)numCities;

    The better solution (to some) would be to make all the variable doubles.

    Both would give you the fraction...
  24. Replies
    18
    Views
    1,936

    What you want is something like this. Notice the...

    What you want is something like this. Notice the reinitialization of sumTemp to 0.


    #include <iostream>

    int main()
    {
    int cityTemp = 0;
    double avgTemp = 0;
    int ...
  25. Replies
    17
    Views
    1,584

    It's only 10300 lines, but it is organized very...

    It's only 10300 lines, but it is organized very well. I do believe vector is the best route, so I am going to just go through and change all of the assignments to push backs, etc. I was just almost...
Results 1 to 25 of 66
Page 1 of 3 1 2 3