Fixed my problem, thanks to A Roxxor |
|
|
|
Fixed my problem, thanks to A Roxxor |
|
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
Here's another version of what slayer posted: |
|
What's the difference between C++ and dev C++ |
|
Dev-C++ is a deprecated IDE, it's not a language or even a compiler. It uses the GCC compiler. The project was discontinued and merged with Code::Blocks. |
|
But it doesn't really matter if you do, though. It's only one extra comparison. The place you really want to use a do...while is where you need to run the data through at least one literation before you're even ready to test the condition (can't think of such a scenario of the top of my head, though). |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
|
|
Emmmm... doesn't that basically the actual code with : |
|
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
Ok, I fixed it. Suck it, Ynot |
|
Last edited by slash112; 01-10-2010 at 03:21 PM.
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
Yeah, C++ is case sensitive. |
|
It's supposed to be <iostream>, not <isostream> (input/output stream) |
|
Last edited by khh; 01-10-2010 at 09:01 PM.
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
I don't understand what it wrong with this. It says "error: expected primary-expression before "else"" and also "error: expected ';' before else" |
|
Last edited by slash112; 01-10-2010 at 09:11 PM.
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
you've forgotten to group the code propperly. What you wrote is basically |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
Yea, I had it all fixed up like that. And yea, all my indents went away while editing it so much, deleting, adding in stuff, I ended up deleting all the indents. |
|
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
You should also loop into while loops and for loops. |
|
Well, one of them is a while loop, and one is a do while loop. I don't really understand the difference, even after reading about it. |
|
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
Thanks, slash. |
|
Yea... I was wondering the same thing. |
|
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
The difference has to do with where the check is made. In the first bit of code, the check doesn't happen until after what's inside the loop has been done, therefore, it ALWAYs gets done at least once, the second piece of code does the check beforehand, so it may never get called |
|
alright, I wrote a program that gives you the circumference of a circle after you put in the circumference and the approximate of pi. |
|
|
|
Last edited by ninja9578; 01-11-2010 at 01:18 AM.
Nice, guitarboy. It's funny how different I would do it from that. It's amazing the amount of possibilities for one single purpose. |
|
-- My Videos --
DILD Tutorial| |WILD Tutorial| |DEILD Tutorial| |Lucid Dreaming is The DEVIL?!
Reality Check! (new)| |Why you're not getting LUCID| |Why NOT to be Scared of SP
|
|
Bookmarks