Search:

Type: Posts; User: wankel

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    3,303

    thats tabstop, that makes sense. I have one last...

    thats tabstop, that makes sense. I have one last question Im stumped on. Im trying to calculate the number of white pixels per row, but so far I can only get it calculate the total number of white...
  2. Replies
    5
    Views
    3,303

    Need some help initializing an array

    Hi, Im trying to initialize the counter array to all zeros, but I keep getting this error when trying to compile:

    xray.cpp:30: error: variable-sized object ‘counter’ may not be initialized


    ...
  3. Replies
    9
    Views
    2,171

    Thanks for the help and advice everyone! I...

    Thanks for the help and advice everyone! I finally got everything working nicely, but there is one last thing I would like some help on.

    At the end of "test.cpp", how do I make z.display() the...
  4. Replies
    9
    Views
    2,171

    thanks tabstop. I made your change and both the...

    thanks tabstop. I made your change and both the fraction.cpp and fractiontest.cpp compile fine individually. But when I try to combine them using the following line on linux:

    g++ -Wall -ggdb...
  5. Replies
    9
    Views
    2,171

    thanks for the help guys! changing it to "z =...

    thanks for the help guys!

    changing it to "z = x.add(x, y);" worked. However, when I removed the second parameter, I get a compiling error:
    mixedfractiontest.cpp:17: error: no matching function...
  6. Replies
    9
    Views
    2,171

    no match for "operator+" problem!

    Hello everyone, Im writing a fraction program that will do some nifty stuff. To cut to the chase, here are my 3 files but Im having trouble compiling the test function, i keep getting a "no match for...
  7. Replies
    13
    Views
    1,447

    Thanks for detailed help guys :) Crap....

    Thanks for detailed help guys :)



    Crap. there was a true false question about binary searches on the exam that said something along the lines of "on average the number of attempts the algorithm...
  8. Replies
    13
    Views
    1,447

    thank you sir, youve been very helpful :)

    thank you sir, youve been very helpful :)
  9. Replies
    13
    Views
    1,447

    Alpha Bravo Charlie |Echo| Foxtrot Golf Hotel...

    Alpha Bravo Charlie |Echo| Foxtrot Golf Hotel
    Alpha |Bravo| Charlie
    Alpha |Charlie|

    why Charlie and not Alpha at the end? or could either one have worked?
  10. Replies
    13
    Views
    1,447

    I thought it would go in alphabetical order, so...

    I thought it would go in alphabetical order, so my answer would have been alpha, brave, charlie, then echo.
  11. Replies
    13
    Views
    1,447

    studying for exam, have a question!

    Im looking over the practice exam our professor put up, and Im having a hard time understanding one of the problems. It goes like this:

    Given the following array of character strings,


    char...
  12. Replies
    53
    Views
    13,273

    a and c are used to calculate the distance. Its...

    a and c are used to calculate the distance. Its the formula I found online. Ill take another look and see if I can find the issue.
  13. Replies
    53
    Views
    13,273

    Im wrapping this up and all I have left is sort...

    Im wrapping this up and all I have left is sort by distance part. I wrote the code but its not giving me the output Im looking for. It doesnt seem to be doing anything.




    //sort by distance...
  14. Replies
    53
    Views
    13,273

    I feel so dumb. I added the y's to the printf...

    I feel so dumb. I added the y's to the printf statement and everything is showing up as it should.
  15. Replies
    53
    Views
    13,273

    #include void read_location(double...

    #include <stdio.h>

    void read_location(double *x, double *y);

    int main ()
    {
    struct coord{
    double x;
    double y;
    };
  16. Replies
    53
    Views
    13,273

    will "struct coord hold;" do the trick? Im...

    will "struct coord hold;" do the trick? Im currently using that right now and its giving me the same error so I think im doing it wrong haha

    EDIT: nevermind, that worked :)

    But when I sort the...
  17. Replies
    53
    Views
    13,273

    Im assuming this isnt as easy as just writing...

    Im assuming this isnt as easy as just writing "struct hold;"?
  18. Replies
    53
    Views
    13,273

    Im still getting errors for the swap part: ...

    Im still getting errors for the swap part:



    hold=array[a];
    array[a] = array[a+1];
    array[a+1]=hold;
  19. Replies
    53
    Views
    13,273

    Im getting this error when I remove the ".x"

    Im getting this error when I remove the ".x"
  20. Replies
    53
    Views
    13,273

    My issue is that I will have to sort them by the...

    My issue is that I will have to sort them by the y's as well. So if I swap the entire struct, will i still be able to sort the y's later on? And to swap the struct, i just remove the ".x" right?
  21. Replies
    53
    Views
    13,273

    Thanks Adak, I couldnt have done it without you...

    Thanks Adak, I couldnt have done it without you guys :) I have one very last question. I wrote a sorting program that will sort the x's and y's in ascending order:



    int pass;
    int a;
    int hold;...
  22. Replies
    53
    Views
    13,273

    Im using a gcc compiler on linux. Could you...

    Im using a gcc compiler on linux. Could you explain the whole void instead of int thing? Im not finding the info I need on google. They both seem to work fine in this code, is there any advantage to...
  23. Replies
    53
    Views
    13,273

    Heres what I have after all your wonderful...

    Heres what I have after all your wonderful advice. Everythings works awesome, thanks everyone, time to move on to sorting and all that fun stuff :)



    #include <stdio.h>

    //function prototype...
  24. Replies
    53
    Views
    13,273

    I rewrote the program since I lost track of what...

    I rewrote the program since I lost track of what I was doing the first time, heres what i have now:



    #include <stdio.h>

    struct coord{
    double x;
    double y;
    };
  25. Replies
    53
    Views
    13,273

    I forgot to say, if I have it without the "&", it...

    I forgot to say, if I have it without the "&", it just displays a "1" every time, no matter what number i choose to enter.
Results 1 to 25 of 53
Page 1 of 3 1 2 3