Page 1 of 1

if u good with c++

Posted: Tue Aug 26, 2008 3:11 am
by blackfalcon
so like i was bored and decided to make a little prog that would run any game you typed in

Spoiler!


problem is, when i type in a game, it runs all the games instead of just the one i typed =/
anybody have an idea on how to fix? :oops:

Re: if u good with c++

Posted: Tue Aug 26, 2008 3:19 am
by Cruor

Code: Select all

if (game == "freecell" || "Freecell")
Always evaluates to true. Same with the rest.

Re: if u good with c++

Posted: Tue Aug 26, 2008 3:27 am
by Grimm-.-
Can c++ Be learned on the internet...
How hard is it to learn?
I Has Intrest in this.

Re: if u good with c++

Posted: Tue Aug 26, 2008 6:34 am
by Stress
To run the program smoother, use an "else" after each "if". Also, make sure your conditions aren't always true :)

Re: if u good with c++

Posted: Tue Aug 26, 2008 6:41 am
by CloudStrider
Grim, C++ is one of the harder languages, I suggest learning something like VB.

Just go on youtube and search tutorials, good way to self learn.

Re: if u good with c++

Posted: Tue Aug 26, 2008 6:45 am
by Grimm-.-
CloudStrider wrote:Grim, C++ is one of the harder languages, I suggest learning something like VB.

Just go on youtube and search tutorials, good way to self learn.

So How many are there?

Re: if u good with c++

Posted: Tue Aug 26, 2008 6:53 am
by CloudStrider
I'm not sure the exact number of tutorials.

There will be stuff like, "How to program a progress bar" or "Hello World Display".

VB is simple like this.

If cmdDisplay.Value = 1 Then
lblHello.Caption = "Hello World"
Else
lblHello.Caption = "Press Display"

That is a very simple program which displays text, it uses a command button and a label.

Re: if u good with c++

Posted: Tue Aug 26, 2008 6:54 am
by Grimm-.-
hmm... How did you guys learn this stuff?...
Proper lessons by a teacher or over the internet?

Re: if u good with c++

Posted: Tue Aug 26, 2008 7:30 am
by CrimsonNuker
Yeah VB is very simple, spend about 2 weeks~ with it and you'll have an idea of what programing feels like. I have yet to learn c++ and java >_>

Re: if u good with c++

Posted: Tue Aug 26, 2008 12:18 pm
by Innovacious
CrimsonNuker wrote:Yeah VB is very simple, spend about 2 weeks~ with it and you'll have an idea of what programing feels like. I have yet to learn c++ and java >_>


Java is so much fun youll want to gouge out your eyes with toothpicks. Its not hard, i just found it really boring and totally useless.

Re: if u good with c++

Posted: Tue Aug 26, 2008 12:34 pm
by Doron
what's c++?

Re: if u good with c++

Posted: Tue Aug 26, 2008 12:40 pm
by BlueWave
C++ is a type of programming language, used to create games or just any types of software- Microsoft Visual Basic or Microsoft Visual Basic C++.

Re: if u good with c++

Posted: Tue Aug 26, 2008 1:33 pm
by Squirt

Re: if u good with c++

Posted: Tue Aug 26, 2008 4:25 pm
by [SD]happynoobing
Cruor wrote:

Code: Select all

if (game == "freecell" || "Freecell")
Always evaluates to true. Same with the rest.

yea, the || separates 2 checking conditions, so in your case first the program checks if game (the input) is the same as "freecell", but then it also compares "Freecell" with nothing, which would always be true.

it should be:

Code: Select all

if (game == "freecell" || game == "Freecell")

Re: if u good with c++

Posted: Tue Aug 26, 2008 5:14 pm
by crazyskwrls
want to learn c++?

may i suggest C++ for you++
:P
Image
i just love that title

Re: if u good with c++

Posted: Tue Aug 26, 2008 7:40 pm
by blackfalcon
Stress wrote:To run the program smoother, use an "else" after each "if". Also, make sure your conditions aren't always true :)


[SD]happynoobing wrote:
Cruor wrote:

Code: Select all

if (game == "freecell" || "Freecell")
Always evaluates to true. Same with the rest.

yea, the || separates 2 checking conditions, so in your case first the program checks if game (the input) is the same as "freecell", but then it also compares "Freecell" with nothing, which would always be true.

it should be:

Code: Select all

if (game == "freecell" || game == "Freecell")


thx guys :)
Grimm-.- wrote:hmm... How did you guys learn this stuff?...
Proper lessons by a teacher or over the internet?


google is ur best friend :)

Re: if u good with c++

Posted: Fri Aug 29, 2008 2:08 am
by ThiefzV2
and who in their right mind would use this program?

Re: if u good with c++

Posted: Fri Aug 29, 2008 2:11 am
by crazyskwrls
well he said it was for fun...