|
|
|
#1 (permalink) |
|
Random Madness
![]() ![]() ![]() Join Date: Nov 2002
Location: Pearl,Mississippi,USA
Posts: 494
|
C++
Learning C++ is difficult but I shall never give up...practice make perfect I always say.
__________________
---------------------------------- | Intel Pentium 4 3.4 GHz | Windows Vista | 1.7 Gig of Ram | Nvidia 8600 GT OC | Sound Blaster Audigy2 ZS - Gamer : Limited Edition | Western Digital 250 Gig HD | Lite-on DVD-RW/CD-RW | HP Pavilion 19" LCD" -------------------------------- |
|
|
|
|
#4 (permalink) |
|
Registered User
![]() ![]() Join Date: Nov 2002
Location: Somewhere , where your not there
Posts: 233
|
hard? heh, if you took at least algerbra 1-2 in school, its pretty easy, caue its really just knowing your math
__________________
P4 2.8ghz (HT), Nvidia Geforce FX 5950 256MB(Core 550mhz, memory at 1.05ghz and running cool) , 1024MB DDR PC3200 ram,160gig HDD, DvD 16x & 52x CD-RW, Windows XP Pro Service Pack 2 |
|
|
|
|
#6 (permalink) |
|
what?!
![]() ![]() Join Date: Nov 2002
Location: programmer's hell
Posts: 127
|
It's really hard when the misfits in the class the year before you fooled around and got 2's on the AP Test which in turn caused the already evil and insane teacher to make the class even harder and more fast-paced. The fact that there are stuck up, ass-kissing geniuses in the class that get the most difficult projects done in one day and are there to make everyone else look bad doesn't help, either. x_x Heh, sorry for the rant. Some stuff in C++ is hard, like recursion. Right now I just wanna get through the class with a B, hehe.
__________________
In order to understand recursion, one must first understand recursion. |
|
|
|
|
#7 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: Maryland USA
Posts: 569
|
I'm almost against people learning C++ first. The main reason being that when a newbie makes a "hello world" program, they look at you and the face and say, "So what?" It's better to learn something that has a GUI interface. Something easy, but that still has all the math (like Visual Basic). Once you get interested and you feel comfortable programming, then go on to C++. Even though your first C++ programs won't have any GUI or drawings, it makes the learning process more bearable, graphics-wise.
__________________
Feline Visit my deviantart page: http://atomicfeline.deviantart.com 1.4 Ghz T-Bird Athlon PNY Geforce4 TI4400 AGP 128 Meg DDR 512 Megs DDR ram Ensoniq Audio PCI 32X CD-ROM Windows XP SP 1 |
|
|
|
|
#8 (permalink) |
|
Banned
Join Date: Oct 2001
Location: Soviet Canuckistan
Posts: 0
|
I learned C++ first, and I really have no problems with it. When I started wanting to learn graphics, I bought a programming book and learned it myself. I'll be doing 3D graphics next semester in school, and then I can show something to the Visual Basic people about graphics.
|
|
|
|
|
#9 (permalink) | |
|
General of Tangerines
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2001
Location: Defending the Sea
Posts: 3,885
|
Quote:
Recursion is usually saved for the last lessons in class. Is your teacher making you do an assignment with recursion? |
|
|
|
|
|
#11 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
|
I don't think recursion by itself is tricky. In fact, some problems can best be solved by recursion - without it, you would have to do a lot of work to get the same result. Unfortunately, most problems best solved with recursion are rather complex by their nature; so while it looks like recursion is difficult, in reality it is used to solve difficult problems. I'll give you an example:
Try to write a parser that calulates terms like "3*(1+2)+((2*2)+1)" (output is 14). (Programming languages with an "eval" function that does the job for you are not permitted ;-) Such stuff is best made with recursion.
__________________
If you think my English is bad, wait till you read my Polish. |
|
|
|
|
#12 (permalink) |
|
.:: PHP King ::.
![]() ![]() ![]() ![]() Join Date: Mar 2002
Location: Bahrain
Posts: 580
|
recursion hehe . . .
All you need in recursion is to practice by solving alot of problem. >>ammoQ: In fact, some problems can best be solved by recursion - without it, you would have to do a lot of work to get the same result. yeah like fibonacci series if you make it using iteration (for,while) it will be too long but with recursion only 4 lines Code:
long fib( long n )
{
if ( n == 0 || n ==1)
return n;
return fib( n - 1 ) + fib( n - 2 );
}
|
|
|
|
|
#14 (permalink) |
|
.:: PHP King ::.
![]() ![]() ![]() ![]() Join Date: Mar 2002
Location: Bahrain
Posts: 580
|
This was my second example Nina the first one was factorial. I remmber I got a question in quiz about recursion:
Show the output (hey not using computer, brain of course) they gave us a three nested for loop with pointer which point to two d array in recursion after that quiz I got
|
|
|
|
|
#15 (permalink) |
|
Banned
Join Date: Oct 2001
Location: Soviet Canuckistan
Posts: 0
|
Heh. I got a nasty recursive program that I had to trace on my midterm as well. I had 5 minutes to solve it. I figured it out right as the teacher said the time was up. I quickly wrote it down and handed it in. I was one scared mother...
|
|
|
|
|
#16 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
|
It might be of interest for some of you that in computer science (e.g. theory of complexity), everything is described as a recursion - there is no such concept as a loop.
__________________
If you think my English is bad, wait till you read my Polish. |
|
|
|
|
#17 (permalink) |
|
what?!
![]() ![]() Join Date: Nov 2002
Location: programmer's hell
Posts: 127
|
I'm glad my school requires VB before C++. In VB we learned all of the concepts without going too much in depth (ex. Binary Trees only as opposed to Binary Trees and Expression Trees, less sorting and searching algorithms). This year we need practically an entire semester for the AP Case Study, so we had to quickly learn how everything we knew last year was implemented in C++. If we went in there the first day and didn't know anything about arrays or variables we simply wouldn't be able to prepare for the AP Exam and its case study. Plus, VB doesn't have pointers.
Heh, recursion hurts my brain. x_x We also had to program Fibinacci and factorials recursively.. not to mention that evil, pointless peg game.. -_-. Hehe everytime we have a recursion assignment someone yells "FIBINACHI!!!" real loud Right now my teacher is making us do a Binary Tree class. In fact it's due tomorrow and I only have about ten percent done. :xThat theory of complexity sounds terrible. I dunno, maybe later in college I'll like recursion, but right now it's too wacky.
__________________
In order to understand recursion, one must first understand recursion. |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|