Jump to content


Photo
* * * * - 1 votes

c++ learning and comprehension


  • This topic is locked This topic is locked
77 replies to this topic

#1 Avatar/Oroborus

Avatar/Oroborus

    elite

  • Members
  • 109 posts
  • Location:san jose, CA

Posted 08 March 2007 - 10:31 PM

how does everyone here or on rohitab.com generate so much unique coe and know so much about the c++ lang. when all of the examples in ebooks or tutorials are all the damn same i/o or string handling you talk about win sock and api hooks and all of this stuff and when beginners ask how do you do it alot of the time google well im asking how do you find this info out is there some magical thing, i have some source code and it is amazing but i can't understand how exactly it works i know what each part basically does so all im asking is how do you find out about more practical programming

#2 livinded

livinded

    Dangerous free thinker

  • Agents of the Revolution
  • 1,942 posts
  • Location:~/

Posted 08 March 2007 - 10:54 PM

Pick up better books? If you aren't able to write your own code or understand code that you are reading you obviously don't know the language all that well. As far as C++ books go I'd recommend "How to Program C++" from Deitel and Deitel as well as "Practical C++ Programming" from O'reilly.

#3 Avatar/Oroborus

Avatar/Oroborus

    elite

  • Members
  • 109 posts
  • Location:san jose, CA

Posted 08 March 2007 - 11:39 PM

ok im not a total idiot i would say im intermediate i understand what is happening but im saying that the "1337" people sit here and say oh i did this cause i was bored and its a really great code and it's so simple yet looks so complicated and thats what i don't understand how the hell do you find out about these things an i got those books i have alot of books i spend 4000 dollars on books a month like it isn't shit my house is the library in my city literally so i have books but i can't pass that last hurtle you know like im still having problems with syntax and all these other things that are difficult to explain to me it seems everybody else has the answers except the "i just heard of c++ yesterday" people i feel like a noob even though i know im not :unsure:

#4 tehbizz

tehbizz

    Progenitor of noob slaying

  • Members
  • 2,039 posts
  • Gender:Male

Posted 08 March 2007 - 11:55 PM

ok im not a total idiot i would say im intermediate i understand what is happening but im saying that the "1337" people sit here and say oh i did this cause i was bored and its a really great code and it's so simple yet looks so complicated and thats what i don't understand how the hell do you find out about these things an i got those books i have alot of books i spend 4000 dollars on books a month like it isn't shit my house is the library in my city literally so i have books but i can't pass that last hurtle you know like im still having problems with syntax and all these other things that are difficult to explain to me it seems everybody else has the answers except the "i just heard of c++ yesterday" people i feel like a noob even though i know im not :unsure:


It's called "reading" and "experimenting"

And if you spend $4000/mo on books, why not just pay someone to write your leet shit? I call shenanigans.

#5 tiocsti

tiocsti

    rekcah-rebÜ

  • Banned
  • 676 posts

Posted 09 March 2007 - 12:06 AM

you learn by writing real applications in the language, no amount of reading can replace this. Anytime you get stuck on a specific concrete problem, google for help, if you still cant solve it, then go to forums, or irc for help.

how does everyone here or on rohitab.com generate so much unique coe and know so much about the c++ lang. when all of the examples in ebooks or tutorials are all the damn same i/o or string handling you talk about win sock and api hooks and all of this stuff and when beginners ask how do you do it alot of the time google well im asking how do you find this info out is there some magical thing, i have some source code and it is amazing but i can't understand how exactly it works i know what each part basically does so all im asking is how do you find out about more practical programming



#6 Avatar/Oroborus

Avatar/Oroborus

    elite

  • Members
  • 109 posts
  • Location:san jose, CA

Posted 09 March 2007 - 12:42 AM

i do those things and my friends give me code that i have to look over an blah blah blah, and i don't just spend it all on c++ books i have a very highrange of things i spend it on but usually it's books and i read those books im the fastest reader i know, bkah blah blah im kinda tired of people not giving straight answer im no noob noob i just need to know where to go from here you know how to better myself i do experiment i o try to write practical programs and i either get error messages or wait that all i get and it sux and well yeah im just trying to find something to read that goes past the while loop an getts into the real heart of the language

#7 livinded

livinded

    Dangerous free thinker

  • Agents of the Revolution
  • 1,942 posts
  • Location:~/

Posted 09 March 2007 - 12:48 AM

If you are getting errors then you obviously don't understand the language as well as you think you do or you are just making common/dumb mistakes which we all do. Why not work on the program until it works instead of just giving up when there are errors? You should also look into spelling/typing classes, I'm have far from perfect grammar and terrible spelling, but at least take the time to read over what you write and spellcheck it. That last post took me forever to read and figure out what you were saying. You will also come off as more than just some random whining 13 year old kid.

#8 tehbizz

tehbizz

    Progenitor of noob slaying

  • Members
  • 2,039 posts
  • Gender:Male

Posted 09 March 2007 - 12:56 AM

Learn what punctuation is. Someone that spends $4000/mo on books (or anything else) and READS them knows how to use periods and commas.

#9 Vangald

Vangald

    SUP3R 31337

  • Members
  • 151 posts

Posted 09 March 2007 - 01:00 AM

It comes from experience. Just start writing programs and keep learning how to do new things. Although I can sympathize with the problems of syntax in C++. It is a hell of a learning curve trying to remember every little coma, simi colon etc. that seems unnecessary (as I believe C# and Python have been the prime examples of that). Just have to practice, research, practice, repeat.

#10 Belial

Belial

    SUPR3M3 31337 Mack Daddy P1MP

  • Binrev Financier
  • 344 posts
  • Location:inter global mega web

Posted 09 March 2007 - 04:54 AM

hell of a learning curve trying to remember every little coma, simi colon etc. that seems unnecessary (as I believe C# and Python have been the prime examples of that). Just have to practice, research, practice, repeat.


I think that just might be his problem ! :)

#11 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 09 March 2007 - 09:22 AM

You spend $4000 a month on books?

Assuming they're nonfiction books, let's say an average of $50 a book (even though that'll be much lower), so that's 80 books a month. An average of 450 pages a book, that's 36,000 pages. An average of 30 days in a month, that's 1200 pages a day.

How about paperbacks? You can get a paperback for about $7 new, so that's ~571 books a month. 400 pages on average, that's 228,400 pages a month, 7,613 pages a day.

Something tells me you don't really spend $4,000 a month on books. That's $48,000 a year. That's 120 inches of shelf space a month, 120 feet a year. I don't think I even have 120 feet of shelf space and I have a lot of books. Or how about paperbacks? 71 feet of shelf space per month, 856 feet per year. You've passed devoting every wall of your house to bookshelves and have now entered devoting entire large rooms to bookshelves.

You want to know how to program in C++? Read some of those books you say you have. In particularly, ones about C++. No one here will give you some magical answer and make you know everything there is to know about C++ from a forum post. I don't understand why you're even posting, since you seem to have already figured out that what you really need is books. What you really need next is to read them.

#12 Avatar/Oroborus

Avatar/Oroborus

    elite

  • Members
  • 109 posts
  • Location:san jose, CA

Posted 09 March 2007 - 02:00 PM

i use comma's and semicolons in my code, im very good at remembering those. and i do try to work on it as much as possible then i have to go back and fix bugs then i change one thing, doesn't do it, then change another doesn't do it , i am still working on alot of programs. and let me rephrase what i said i meant i spend 4000 dollars a month mostly on books not always or all of it on books i read about 3 - 7 books a month depending on size of it, and i get this money from my father. im 18 y/o my fatehr died when i was 5 months and he was in world war two he was almost 80 when he had me and now i get alot of money from his days in the army so over all i spend about maybe 1000 dollars on books a month at the most. i practice alot im mostly programming like 8 hours a day well 4 to 8 since there is so many on here worried about prescision, i just want to know is there any really good practice exercises i can do or something i mean any advise and not just the punctuation bashing i get.

#13 angelfly

angelfly

    H4x0r

  • Members
  • 39 posts
  • Location:Taunton, MA

Posted 09 March 2007 - 04:27 PM

The best thing to do is not just read a book. Either use books or free online material to get a grasp of the language. After that think of an app you want to make and start on it. You'll use what you know and as you go deeper in it you'll become more proficient. I always recommend people do small apps instead of just pumping out hello worlds and loop test.

#14 Avatar/Oroborus

Avatar/Oroborus

    elite

  • Members
  • 109 posts
  • Location:san jose, CA

Posted 09 March 2007 - 05:38 PM

a couple of things i dont understand. you say that you sit and code for up to 8 hours a day, and you've been doing this for how long? it would seem to me that if you practiced anything for that many hours a day that you should at least have some sense of what questions to ask. the only thing that you have told any of us is that you dont understand c++ but then in the same sentence you say that "im no noob". well i hat to break it to you but you ARE! just accept that and quit trying to pose as something that you're not. you havent gotten a straight answer because you havent asked a straight question about programming in c++. you also say that your friends give you code to look over "blah blah blah" so if you have friends that know what they're doing then why arent they helping you out? if what you say is true and you do have tons of books and you are the "fastest" reader you know (/me lolz) i would suggest slowing down so that you may absorb some of the content that you're reading and understand it a bit more. you can also post your uber l33t code right here in the forums if you have a question about something in your script thats giving you trouble. and if you think that youre gonna be able to just start coding and not get any error messages, youre truly mistaken my friend , errors are about as common as snow in alaska bro, and if think that you can just learn "the heart" of the language as you say without learning the basics then you are going about this entirely the wrong way. if you dont want to take the time to learn about variable types, making constructive arguments, factoring classes, stream I/O, handling errors, etc. etc. then how do you think you can just jump into the heart of the language and start coding? dosnt make sense does it? stop being so defensive, and if youre actually serious about learning the language then ask specific questions about real problems that youre having with your code.

i have been programming for two years now off and on, been programming in c++ for about 6 months straight, read over 15 books on it, and can't understand the complicated subjects. pretty much past the while loop.
and let me rephrase myself im not a total noob.
im not posing as anything i suck at code making, i have no imagination or application in mind.
i haven't given a straight answer cause i can't word it correctly.
my friends don't help me cause i don't want there full help i just want tips, if i have people always helping me i will grow dependent on there help.
and with speed reading comes better comprehension look it up.
thank you i will post my code on here more often then, but its far from uber 1337.
i no there a errors i just get pissed off when i fix one problem and get another.
im aking only for tips on how to learn and not but just practicing code over and over i know that, im asking what helped everyone else out.
ok one problem i am having is putting a while loop in a if statement can one of you give me a non specific example of this please




tips on how to read this (lol) each question or statement in the quote has a answer, the answer has its own line dedicated to it .

#15 tehbizz

tehbizz

    Progenitor of noob slaying

  • Members
  • 2,039 posts
  • Gender:Male

Posted 09 March 2007 - 07:19 PM

Doing it for 6 months but can't get past a while loop? I still call shenanigans considering how dead /easy/ while loops are to write.

Like everyone else says, you obviously don't understand the language at all and if you've read 15 books on it, you for damn sure would be able to get past a while loop and would easily be able to troubleshoot your own errors. Either that or you're buying the worst books possible on C++.

Overall: shenanigans.

#16 Rightcoast

Rightcoast

    mmm ... donuts

  • Agents of the Revolution
  • 2,074 posts
  • Gender:Male
  • Location:321

Posted 09 March 2007 - 07:31 PM

Dude ... this would go better if you gave up on the handle where you forever be known as a guy who can't spell, punctuate, articulate questions or code, yet insists he does does all of the above with above average ability.

Not a flame, just some unsolicited advice. Forget this account and come back as someone humble and honest with themselves about what they do and do not know, and with the ability to use a period and the shift key.

The ONLY reason this isn't a PM, is because I think you need to see a couple people go "yeah man, good idea", and so other youngsters get the message.

#17 PurpleJesus

PurpleJesus

    Dangerous free thinker

  • Members
  • 1,578 posts
  • Gender:Male
  • Location:800

Posted 09 March 2007 - 07:45 PM

Dude ... this would go better if you gave up on the handle where you forever be known as a guy who can't spell, punctuate, articulate questions or code, yet insists he does does all of the above with above average ability.

Not a flame, just some unsolicited advice. Forget this account and come back as someone humble and honest with themselves about what they do and do not know, and with the ability to use a period and the shift key.

The ONLY reason this isn't a PM, is because I think you need to see a couple people go "yeah man, good idea", and so other youngsters get the message.



yeah man, good idea.


Maybe you should play with BASIC first. Are you strong minded with math?? you don't have to be a math god taking all of those advanced classes and such.. just good with a calculator... You remind me of this guy who is a super god with crossword puzzles, language, and books. but when it comes to turning a wrench he's the village idiot... no offense.. but some people just don't get it.

plus spell check is a god send...

Start easy, write you a while loop that just prints out the number, before, during and after the loop, and not just the number, but a letter in front of it like (b1,d1,d2,d3,d4,a5) so you know 'where' in the loop it was printed from... and see where they don't jive up with what your expecting... then change your expectations.

#18 rainwater_stillicide

rainwater_stillicide

    SUP3R 31337 P1MP

  • Agents of the Revolution
  • 282 posts
  • Location:Scotland

Posted 09 March 2007 - 08:21 PM

ok one problem i am having is putting a while loop in a if statement can one of you give me a non specific example of this please


I couldn't think of a good example but this is how you do it.

#include <stdio.h>

main()
{
	int x = 10, y = 0;;
	if( x != y )
		while( y < x )
			printf("%d", y++);
}

Edited by rainwater_stillicide, 09 March 2007 - 08:39 PM.


#19 Avatar/Oroborus

Avatar/Oroborus

    elite

  • Members
  • 109 posts
  • Location:san jose, CA

Posted 09 March 2007 - 08:28 PM

I can get past the while loop, I can understand that. Can you please stop flaming on my punctuation.


#include <iostream>
using namespace std;
int main()
{
	for(int i = 1; i<266;i++)
	cout << (char) i;
	cin.get();
	return 0;
}

here is some code i did to change a integer to a character. everyone really needs to stop worry about legitimacy of my claims and focus on the subject.
its useless code at this level but code be used in a encryption program. i have more simple stuff like this but i have no real use for them yet cause i can't do much more i suck and need help in general. like this one im trying to put a gui to it for now it is just console
/******************************************************************************* program: thoughts.exe v0.1.1* file name: 1.cpp* compiled with: Dev-C++ 4.9.9.2* OS: MS Windows XP* author: Oroborus* date: 10.20.2006* desciption: shows some of my inner most thoughts with a menu.* revised: 10.21.06 v0.1.2  <--------------------------\* added:False entry restart                                      see the huge gap in the dates i was still learning  conditional looping * revised: 2.20.07 v0.1.3    <------------------------- /* added:choice to choose another option or end*******************************************************************************/#include <iostream>  //include the pre-processor iostreamusing namespace std;int main() //initialize the main function{   // print out the menu and intialize var: choicestart:    cout << "\n\n\ntype in your choice for what you want to do. \n"    "1. read my theory of god.\n"    "2. read how i feel about kat.\n"    "3. read my plans on how i am going to kill kat.\n"    "4. read what my plans for the future are.\n"    "make the selection: ";    int choice;    cin >> choice;    // allow access to the different options of the menu based on her choice    switch(choice){    case 1:{         cout << "\tgod is there it just doesn\'t care.\n"         "\tand why should it, what have you done\n"         "\tto deserve its attention. he loves you\n"         "\tbut why would such a great being try to have\n"         "\tsuch a hands on approach about everday life\n"         "\tif i knew everything i would want to distance\n"         "\tmyself from my creation to better see if my\n"         "\tassumptions with the future were true to see if\n"         "\tmy absence would make a difference\n";         char n;         cout << "Do you want to continue?(y/n): ";         cin >> n;         if(n == 'y')         goto start;         else             break;         }    case 2:{         cout << "\tI love kat, i love kat more then anything in\n"         "\tthis world i would gladly die for her i want to\n"         "\tbe with her she makes me so happy and so mad at\n"         "\tthe same time i mean if she would just give me\n"         "\tone chance so i can love her again. when i heard\n"         "\tshe had sex with nick my heart stopped i died that\n"         "\tday inside and when i would totally forgive her and\n"         "\tjust move on with our lives but it seems she wont\n"         "\teven talk to me anymore i hate it that she wont\n"         "\tman what i would do to get back with her shit i\n"         "\twould murder thousands of people just for her attention\n"         "\tbut only time will tell when i will get my chance\n";         char n;         cout << "Do you want to continue?(y/n): ";         cin >> n;         if(n == 'y')         goto start;         else             break;         }    case 3:{         cout << "\ti don't know how i'm going to do it really either i\n"         "\tknow i am going to do it but not how really what i am\n"         "\tthinking of doing is hiding out at her house like in the\n"         "\tgarage wait for her to come home from a show or go out\n"         "\tto school and jump out from this room near her car where\n"         "\tit is always parked when she walks past grabbing her and\n"         "\tslitting her throat then running like i stole something\n"         "\thiding out for years or killing myself by od or hanging\n"         "\ti also have plans of kidnapping and torture but those\n"         "\tseem unlikely i wouldn't hurt her or kill her or do\n"         "\tanythign bad to her if she would just love me and\n"         "\tgive me one chance everything would be ok but it seems\n"         "\tthat this is the only chance i have to put my seriousness\n"         "\tthere and show people im not one to just be walked over\n";         char n;         cout << "Do you want to continue?(y/n): ";         cin >> n;         if(n == 'y')         goto start;         else             break;         }    case 4:{         cout << "\ti want to for me and kat to be together if not i'll kill\n"         "\ther i mean really i am going kill her but she doesn't\n"         "\tthink so i mean really i am just going to fucking kill\n"         "\ther and throw my life away but if my plan of getting\n"         "\ther alone and maybe threatening her life but ultimately\n"         "\thaving sex with me and i cum in her and get her pregnant\n"         "\tor persauding her to give me my second chance i mean if\n"         "\tshe does that i mean really god damn it i fucking love her\n"         "\tand i will kill her if she gives me my chance then i have no\n"         "\treason to be angry with her and i could get a job and go to school\n"         "\tand pay off my debts and just get my life back on track and\n"         "\tmy life with her my one and only true love i love you babygirl\n";         char n;         cout << "Do you want to continue?(y/n): ";         cin >> n;         if(n == 'y')         goto start;         else             break;         }    default:{         cout <<"\t\tYour selection was not valid choose again\n";         goto start;         }      }}
notice my bad punctuation i know these programs suck but they are just my practices to get the syntax scheme of C++ and yes i have been through therpy the bitch had a abortion but thats for another forum

Edited by Avatar/Oroborus, 09 March 2007 - 08:40 PM.


#20 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 09 March 2007 - 08:42 PM

After reading your second program... Really, you need help. Consider seeing a therapist. I mean, come on, you used goto. That's just a cry for help.

(Seriously, see a therapist.)




BinRev is hosted by the great people at Lunarpages!