#### Archived

This topic is now archived and is closed to further replies.

# Could some one answer a few questions?

This topic is 5379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello. . . i have C++ for dummies and am not te far into it. . . and im starting to think this is EXTREAMLY hard. . . could some one tell me if this gets any easyer? or am i doing this wrong? is there an easyer way? i dont mean to sound lik a whiner but ive read chapters 1-4 6 times each and cannot get the hang of it! am i just an idiot? im starting to think im not smart enough for this. any way, thanks in advance... Forgotten. [edited by - Forgotten on March 26, 2003 10:27:57 AM]

##### Share on other sites
I have it aswell, think it''s one of the best for beginers...
If you find c++ to hard you could always try VB.

##### Share on other sites
I haven't read it, but perhaps you should practice everything in a chapter until you feel you have a good understanding of it before you move on to the next.

[edited by - smart_idiot on March 26, 2003 10:35:13 AM]

##### Share on other sites
hehe, I use that book too, I love it, it''s funny and the language is easy enough, ok, now here is the trick.

First of all, for each bloody sentance you read, stay concentrated, concentrate on what''s in there.
Read each line, think it over, and explain to yourself, EXACTLY what it is.

If there''s a line or two you don''t understand, this is mostly because of the confusing words, I have to admit it''s a bit confusing with lines like:

The "second function that only has one argument accumulates the value of double x"

If it''s the words in general, get one of those books that explain what words mean, or, if you''re staying stuck, you could add me to your msn or send me an email at "www.loppemann.com"

I can help you through those first chapters, but that''s about as far as it goes.

##### Share on other sites
are you doing the examples?
If you are then, what you need to do is play around with them a bit, say for example, they are having a program add 2 numbers and display the results.. well try changing that code a bit and see what it does..

I don''t know what they are covering in the first 4 chapters, but I''d guess they have something that you could play around with, thats the best way to learn programming I find, if you have something that works, change it and hopefully it still works..

Please visit Turt99 Productions

##### Share on other sites
that makes sense. . .
the only thing i find wrong with this book is i cant put what i learn to any use yet, i am dislecsic, i have some trouble holding on to what ive learned unless ive used it (no im not a retard). is there any web sites where i can get simple program code that i can write for free, that might work....

Forgotten.

i cant find any examples, i think thats my problem.....

Thank you every one.... Not to sound like a weirdo but, you guys (and girls) ROCK! god this site rules.

[edited by - Forgotten on March 26, 2003 10:42:04 AM]

##### Share on other sites
no, you''re not stupid....

try other books then, don''t be discouraged because the title says it''s for ''dummies'' means that if you cannot understand it you''re worse than a dummy....

btw: is this your first time learning a programming language? if so, then it''s ok if you don''t grasp the idea of programming yet. the trick is to keep on asking...a lot of people here are glad to help in answering your questions...

##### Share on other sites
Yes, it is hard to understand it if you don''t use it. It''s a good idea to be infront of your IDE while you read your book so you can try things as you come to them.

##### Share on other sites
Here''s an increasingly unpopular opinion (it seems) around here: C++ is not a good beginner''s programming language. This isn''t mere opinion; the amount of infrastructure overhead of the language is high. The syntax is elegant and uncluttered, but by no means intuitive. C++ requires a significant change in thinking to grasp; a language that more closely reflects the way most people think about structured/sequential events is a better option.

My suggestion? Start with Python. For one thing, the language has zero infrastructural overhead (no need for entry-point functions and the like, just start coding) and a significant part of the beginner-level functionality is built-in (no need to #include or import to gain access to output routines, for example). Second, Python scales from beginner to expert, making simple things really simple and tough things accessible. And I''m not the only one who thinks so.

Most importantly, for a beginner interested in game development, Python (coupled with PyGame and/or pyOpenGL) lets you rapidly obtain visible results, which can go a long way to bolstering your confidence.

Once you''ve learned Python - and then only if you still feel it useful/necessary for your goals - learn C++ and see how much more easily you''ll pick it up. In fact, you may be frustrated by C++''s lack of certain features that you would have grown accustomed to in Python (like reflection).

Either way, keep at it and good luck!

##### Share on other sites
No thanks, i have my mind set on C++, thank you for your opinion though....
the people on this board have help me alot.... i think i can pull through.

##### Share on other sites
The book probably does have examples, if not, feel free to experement with this simple program:

    #include <iostream>#include <cstdlib>using namespace std;/* This returns a random number between min and max. Don't worry   too much how it does what it does for now. */int RandomNumber(int min, int max) {  return rand()%(max-min+1)+min; }int main() {  // This seeds the random number generator with the current  // time so that we will get different numbers every time  // we run it.  srand(time(0));    // Prints the programs title.  cout << "The random number guessing game!" << endl       << "The answer is between 1 and 100!" << endl;      // This variable stores the correct answer.  int answer = RandomNumber(1, 100);    // This variable stores the users guess.  int users_guess;    do // Do everything in the curly brackets while users     // guess doesn't equal the answer   {    // Print message asking user for guess.    cout << "What is your guess? ";        // Get the users response.    cin >> users_guess;        // If guess is bigger than answer, tell user it was too high.    if(users_guess > answer)     cout << "Nope, too high." << endl;        // If guess is smaller than answer, tell user it was too low.     if(users_guess < answer)     cout << "Nope, too low." << endl;   }  while(users_guess != answer);    // The user has guessed the answer, let them know.  cout << "You win! Good job." << endl;    // If you're using Dev-C++ this line will keep the  // program from quitting before the user can see what we  // wrote.  system("pause"); }

[edited by - smart_idiot on March 26, 2003 12:45:42 PM]

##### Share on other sites
ok, Thank you.
you''ve helped alot

##### Share on other sites
I agree that if you havent programmed before in another language, it may be hard to understand the concepts of C++. Im understading how things work because ive done it with VB and Java.

You should seriously think about doing a language like Java. Its a nice beginning object oriented langauge that should get you somewhat prepared for what C++ is like.

I wish you good luck in your programming future.

##### Share on other sites
Thank you for the luck... the thing is about learning a diff language is i want to make a game SO bad that id jump of the cliff oppesed to walking the paved path.

##### Share on other sites
question 1, do you have a compiler available? is it setup? do you know how to compile and run a program?

if any of the above are no, then you should probably take a day out of learning to code, and just concentrate on getting a compiler setup, and building a ultra simple program, asking for help if you need it.

##### Share on other sites
You might want to try a better book if you can afford it, and this one is very good for beginners new to programming: Dietel & Dietel Learn To Program

Moo moo MOO moo moo

[edited by - Bovine Supremacy NOW on March 27, 2003 5:31:38 PM]

##### Share on other sites
I agree with BSN, I found many of the Dietel & Dietel programming books (I have the c, c++, and Java books) helpful and have used them to find good helpful exercises for tutoring others in my college classes.

##### Share on other sites
First of all, programming , although difficult, can be accomplished with time and practice. I'm a beginner myself, but I've had my share of troubles trying to learn things, but I just kept trying and eventually accomplished my goal. I'm a new programmer and my first language is C++(although I am learning C at the same time) and I havn't found it to be too difficult. I have the C++ dummies book, and if you want my opinion, I really don't like it. The thing about the book, is that it gives code that I do not feel is accurately explained. Particularly the section on arrays. Anyway, I highly recommend a C++ book that gives you excercises to complete based on the knowledge given to you in the book. You don't truly learn how to master anything until you've used the knowledge you've learned to accomplish something on your own. Don't be discouraged, just keep trying and looking for other ways to learn the same information, visit websites, other books etc. A good website that gives the very basic information is www.cprogramming.com. I recommend it for learning the basics of C++ but you should consult other sources as well because it leaves out some information.

[edited by - bioagentX on March 28, 2003 12:09:35 PM]

[edited by - bioagentX on March 28, 2003 12:11:08 PM]