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,...
Type: Posts; User: Zzaacchh
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,...
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.
...
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
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...
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...
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...
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...
I'll look into that, thanks.
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...
Yes, I realize it looks like crap. It looked better before I pasted it into here. It changed the indentation quite a bit.
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>
...
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...
What about combining the statements..
like:
if (something > somethingelse && something > anothing thing && something != somethingdifferent || something < someotherdifferentthing)
What is...
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...
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...
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...
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...
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...
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...
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. :)
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...
Sweet, thank you.
Hi!
Just wondering, how to turn a normal "Enter" response to a default entry?
i.e.
float number1;
cin Input number: ;
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....
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...