Jump to content

Clueless


OmNi-FrAg

Recommended Posts

Always been a hardware guy m'self, but i think it's high time i should at least learn something new. It's always been advised to me that learning a programing language could do me bunches of good, and i finally caughed up the 30-some-odd dollars and bought a book that could choke a walrus. So, the first thing this "chunk-of-my-money" of a book tells me, is that i need to spend more of it. I need a C++ compiler and editor. I'm sure there's got to be a free downloadable kind of software, but i don't have a clue what i'm looking for. If any programer Gurus want to lend a bit of their brain power, it'd be much appreciated.

 

OmNi-(always looking to learn more)-FrAg

Share this post


Link to post
Share on other sites

Well MS visual C++ is nice because it is an IDE (integrated development environment) which makes it easier to learn I think since you don't need to put 154637 flags on a command line and use notepad. Butttt since you don't want to pay you can use something like Borland. It is a command line compiler though so it can be a pain in the rear..

Here's the link to the download: http://www.borland.com/products/downloads/...d_cbuilder.html

have fun with it man, good to see you like to learn so much. Also another option is to install Linux because I know they have good free IDE's, but being as how you're not a software guy I don't know how far you want to get into that ;))

Share this post


Link to post
Share on other sites

Hey thanks man, really looking to get started but it's funny.... my "Teach yourself C++ in 21 days!" book is based on the reader knowing nothing about it in the first place, yet it tells me such vague requirements to get goin' on it lol. All it says is a "Compiler" and "Editor" so i'll download your link, i'm sure it's what it wants. Much appreciated bro. I'll try to keep this thread open because oh lordy i'm sure i'll have a few more questions along the way lol. Thanks again.

Share this post


Link to post
Share on other sites

Thanks a lot guys, gettin' a little scared seein as how i'm not even started on this yet and i'm having trouble lol. It doesn't specify on what exactly i need, but i'll go with what's free until i get a feel for what i should get. I appreciate the help.

 

(Had to edit this in since it seems i'm not aloud to post twice in a row lol, my Teach yourself C++ book has an initial exercise to get the reader comfortable with the process of a general program, i was able to find what looks like a good compiler (Bloodshed Dev-C++), but when i went through the steps my book told me to, and compiled/linked the source code, it came up with "c:\BLOODS~1\Bin\ld.exe: cannot open -lstdc++: No Such File Or Directory", now the "No such file or directory" part i understand lol, but is that something that my compiler should have? Or am i not doing something right? Man i'm a hopeless cause lol. If anyone has any advice, (i.e. what could help, or that i should just give up now) feel free to post, thanks again :blink:

Edited by OmNi-FrAg

Share this post


Link to post
Share on other sites

#include <iostream.h>

#include <stdlib.h>

#include <time.h> // Needed for random generating

#include <windows.h> //for colors

 

 

#define MAX_RANGE 20

 

int main ()

{

char input[300];

int value;

 

/* This introduces the program to the user

hopefully they don't believe in this thing.

LOL! */

 

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),

FOREGROUND_RED);

 

 

cout<<"----------------------------"<<endl

<<"8BALL SIMULATOR FOR COMPUTER"<<endl

<<"----------------------------"<<endl

 

<<"\nInstructions:"<<endl

<<" Type in a question that can be answered"<<endl

<<"to a 'yes' or 'no'. Please try to stay"<<endl

<<"within asking a questing of what will be"<<endl

<<"to come. * AND REMEMBER! A question that"<<endl

<<"is basically ask more than once, will no"<<endl

<<"longer be answered validly.*"<<endl

<<"\n Don't take this too seriously. Its pretend."

<<"\002"<<endl

<<endl

<<"This program was brought to you by: Machewy"<<endl;

 

 

 

 

index: // the main menu

 

srand ( time (NULL) ); // Initialize random generator

value = rand()%MAX_RANGE+1;

 

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),

FOREGROUND_BLUE);

 

cout << "\n\n\nAsk you fortune question here:";

 

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),

FOREGROUND_GREEN);

 

cin.getline(input, 300);

 

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),

FOREGROUND_BLUE);

if (value == 1)

{

cout<<"\nForget it!";

goto index;

}

 

if (value == 2)

{

cout<<"\nNot telling! :P Na! Na! Ne! Na! Na!!!.";

goto index;

}

 

if (value == 3)

{

cout<<"\nNo answer. Go find a fortune cookie!";

goto index;

}

 

if (value == 4)

{

cout<<"\nThats a definite.";

goto index;

}

 

if (value == 5)

{

cout<<"\nSlim Chance!";

goto index;

}

 

if (value == 6)

{

cout<<"\nYes.";

goto index;

}

 

if (value == 7)

{

cout<<"\nDefinatly!";

goto index;

}

 

if (value == 8)

{

cout<<"\nOh yeah!";

goto index;

}

 

if (value == 9)

{

cout<<"\nAre you kidding?";

goto index;

}

 

if (value == 10)

{

cout<<"\nOf course!";

goto index;

}

 

if (value == 11)

{

cout<<"\nPossibly.";

goto index;

}

 

if (value == 12)

{

cout<<"\nThats a question that I can't even answer.";

goto index;

}

 

if (value == 13)

{

cout<<"\nYes, but am still not 100% sure yet."<<endl

<<"Ask me again for the correct answer.";

goto index;

}

 

if (value == 14)

{

cout<<"\nWouldn't really count on it if I were you."<<endl;

goto index;

}

 

if (value == 15)

{

cout<<"\nHmm.. Good Question. I guess I don't really"

<<"don't know."<<endl;

goto index;

}

 

if (value == 16)

{

cout<<"\nHa! Ha! The answer is so obvious! Yes!!"<<endl;

goto index;

}

 

if (value == 17)

{

cout<<"\nAre you stupid? NO WAY!!"<<endl;

goto index;

}

 

if (value == 18)

{

cout<<"\nGo eat a some cereal, and you will find your"

<<"answer in the bowl. . ."<<endl;

goto index;

 

}

 

if (value == 19)

{

cout<<"\nI can't say. I'm afraid that it will hurt your"

<<"fealings. . ."<<endl;

goto index;

}

 

if (value == 20)

{

cout<<"\nNever. . ."<<endl;

goto index;

}

 

 

return 0;

}

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...