background preloader

C++

Facebook Twitter

Neural Net in C++ Tutorial. Peter's gdb Tutorial: Table Of Contents. Peter's gdb Tutorial: Administrata. By Peter Jay Salzman Why Write This Tutorial?

Peter's gdb Tutorial: Administrata

This is one of the most comprehensive GDB tutorials on the Internet. It's more than you'd find in most books, which tend to discuss GDB as a lightning-fast afterthought. I wrote this document because I couldn't find a good GDB tutorial. The only comprehensive source of information about GDB is GNU's GDB User's Manual, but learning GDB from it is like learning a foreign language from a dictionary. I'll be using sample programs, and there will be links to the source code in each section that uses them, along with compilation instructions.

Acknowledgements And Dedication This tutorial is sincerely and respectfully dedicated to Richard M. I'm in a perpetual state of learning, and thanks goes to the following people who've helped me understand C and GDB: Authorship And Copyright This entire tutorial is copyright (c) 2004 Peter Jay Salzman, p@dirac.org. The canonical and most updated version of this document can be found at www.dirac.org/linux/gdb. C++ A General Purpose Language and Library: (05) RAII. Game From Scratch C++ and SFML Edition! Want to create a game using C++ and SFML?

Game From Scratch C++ and SFML Edition!

This is the perfect place to start! This tutorial series will follow the creation of a simple game in C++ from the very beginning till the end, a micro-version of the overall purpose of this site. C++ is an evolving language standard and a great many tutorials out there are horrifically outdated or just plain bad. Similarly, most tutorials in books or on sites are by their very nature required to be very short and concise. This site fortunately does not have that restriction, so I can babble on and on and on… This series is meant to be a living document, so if you have any questions on specific section, let me know and I will update accordingly! Finally, I don’t pretend to be an expert on C++ nor SFML, so if you see a mistake or you disagree with something I have said, let me know. Alright, lets get this started. EDIT: This tutorial was written a couple years ago and targets Visual Studio 2010. The Introduction Part 1 Part 2 Part 3 Part 4 Part 5 Part 6. Dev-corner: Bart K. explains (and rants about) C/C++ pointers.

C pointer syntax is an egregious design flaw.

Dev-corner: Bart K. explains (and rants about) C/C++ pointers

It's so bad, in fact, that it's solely responsible for multiple generations of programmers struggling with pointers, which frankly aren't that hard of a concept. I'm going to take some time today to explain pointers and, in the process, point out exactly what it is I can't stand about C/C++ pointer syntax. If you've never been able to wrap your head around pointers up until now, please give this a read, and hopefully you'll have a better understanding of them by the time you get to the end. I'll start with the basics (which you probably already know, but please bear with me). Conceptually, a pointer is a variable that points to a location in memory, generally another variable.

Int i; Now you want to declare an integer pointer: int *i; When you're declaring variables, the asterisk signifies that the variable is a pointer. Ha! A pointer is a type, the same way that character and integer are types. Int* i; int a, b; Good so far. Programming Building Blocks. "Where do these stairs go?

Programming Building Blocks

""They go up. " --Ray Stantz and Peter Venkman, Ghostbusters What is programming, anyway? I mean, you're learning how to do it, but what is it? Well, it's, umm, kind of like, well, say you have this multilayered chocolate and vanilla cake sitting on top of an internal combustion engine and the gearbox is connected to the coil with a banana. What is programming, anyway? If you don't want a good grade, the computer can do that without your intervention.

The second thing you need to get started is the knowledge of how to tell the computer to do these things. What you can do as a programmer, though, is get through the assignments doing something that works, and then look back at it and see how you could have made it better or faster or more concise. Eventually what you'll find is that the stuff you wrote back in college (e.g. The only way to go is up. 2.1. Advanced C++ Lessons.