Search:

Type: Posts; User: Zzaacchh

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    10
    Views
    135,141

    Sweet, thank you. It was driving me mad. :) ...

    Sweet, thank you. It was driving me mad. :)

    So, to get this strait, you cannot pass a character array to a function unless it is actually a pointer to the array (makes sense) Other than that,...
  2. Replies
    10
    Views
    135,141

    Passing CHAR array to function

    Is it possible to pass an array of CHARs to a function? How do you do it? I keep getting garbage.. I know I'm missing something, but I'm not even sure if what I'm trying to do is possible.
    ...
  3. Replies
    3
    Views
    2,294

    Reference variables..

    That sounds about right, I'm going to try that.

    If I can't get it to work, I'll post the code that I have so far.

    thanks!

    -Z
  4. Replies
    3
    Views
    2,294

    Sending multiple arguments to function..

    I need to have a function that gathers two INT's and a DOUBLE from the user, and then another function that takes those INT's and DOUBLE as arguments, and uses them in calculations to perform and...
  5. Replies
    32
    Views
    3,517

    Yep.

    Yep, I had one like that too.. in which you need to find the lowest number entered, but that was WITHOUT having to save the entered numbers as variables, so you could just say "if this next number is...
  6. Replies
    32
    Views
    3,517

    Thanks!

    Yeah, I figured that one out about 5 minutes after writing to here for some help.. (usually happens that way)

    I *was* looking for a more 'elegant' way of doing it, lest I had 300 numbers instead...
  7. Replies
    32
    Views
    3,517

    Need help with function..

    Hello,

    I'm just trying to cheat here with my homework.

    I need to find the lowest number of a group of 5 numbers, entered by the user.

    I also need to save all 5 numbers. So, I think it...
  8. assert

    I'll look into that, thanks.
  9. It's all good

    well, I think I got it working.. just had to add a couple more things, switch some things around and it worked fine. usually I figure it out about 10 minutes after I post a question for help! ;)

    I...
  10. Thanks

    Yes, I realize it looks like crap. It looked better before I pasted it into here. It changed the indentation quite a bit.
  11. switch

    Here, I'll just post what I have so far, with the problem I have commented out.. maybe that will be easier for to explain. :)



    #include <cstdlib>
    #include <iostream>
    #include <iomanip>

    ...
  12. Exiting evaluation..

    No, I mean COMPLETELY exiting. Like, if the very first thing is not true, then just exit.. or if you get a few things into it, and something evaluates to false, then just exit.. otherwise you have to...
  13. What about combining them

    What about combining the statements..

    like:

    if (something > somethingelse && something > anothing thing && something != somethingdifferent || something < someotherdifferentthing)

    What is...
  14. Replies
    16
    Views
    2,554

    Good article.

    Well, I'm sure when I get past chapter 4 of my book, it'll talk more about floats. It has mentioned that you cannot use == to compare floating point numbers or doubles, and a few other things, but...
  15. Replies
    16
    Views
    2,554

    Minute numbers

    Thats right, but I thought the "cin >> setprecision(2)" would take care of that? I need to look at my first message and see if I forgot to include that for the 'cin' statement.

    I'm going to dink...
  16. Replies
    16
    Views
    2,554

    Well, I think I got it figured out, but still not...

    Well, I think I got it figured out, but still not sure why it's having trouble knowing that .59 is < .6

    Specifically, you have it right.

    .59 is ok, .6 is not
    1.59 is ok, 1.6 is not,
    2.59...
  17. Exit early (abort) and max # of tests allowed.

    Ok, I have two more questions.


    Is there a way to about the current evaluation, say, if you want the program to abruptly end for whatever reason..

    and

    How many if's &&'s and ||'s can you...
  18. Replies
    16
    Views
    2,554

    This is just part of a small program in my...

    This is just part of a small program in my college book.

    The goal is to make a program, in which you enter a time and an amount of time, and calculate the results based on what rate the time you...
  19. Replies
    16
    Views
    2,554

    Problem with simple IF

    for some reason, this doesn't work, and I can't figure out why.

    I'm probaby missing something easy, but here it is.. this is only part of the code I am testing, because it passes every time no...
  20. No error checking..

    oh, crap.. I just wrote this long message, then realized that you're right.. I forgot to add the frigging path.. it should be inFile.open("c:\\demofile.txt");

    Ok, thanks. I feel dumb. :)
  21. Using inFile to read from TXT yields gibberish

    Hello. I'm using the following code to try to just read a few names from a text file (I'm learning C++ from a college book). However, when I run it, the outputFile program makes the names right, but...
  22. Replies
    3
    Views
    1,912

    Alrighty

    Sweet, thank you.
  23. Replies
    3
    Views
    1,912

    How to make blank entry = default

    Hi!

    Just wondering, how to turn a normal "Enter" response to a default entry?

    i.e.



    float number1;
    cin Input number: ;
  24. Replies
    4
    Views
    2,839

    Ahh..

    That is the problem I finally realized, which is why I wanted to convert the product to an interger so I could just say if ( converted == 5) instead of if ( converted > 5) because that wouldn't work....
  25. Replies
    4
    Views
    2,839

    Well.....

    Well, like I say, there was some garbage in there from me just trying a various amount of different things. I thought maybe I would just convert the CONVERTED symbol to an interger.. (which didn't...
Results 1 to 25 of 26
Page 1 of 2 1 2