background preloader

Cplusplus.com - The C++ Resources Network

Cplusplus.com - The C++ Resources Network

http://www.cplusplus.com/

The C++ 'const' Declaration: Why & How The 'const' system is one of the really messy features of C++. It is simple in concept: variables declared with ‘const’ added become constants and cannot be altered by the program. However it is also used to bodge in a substitute for one of the missing features of C++ and there it gets horridly complicated and sometimes frustratingly restrictive. The following attempts to explain how 'const' is used and why it exists. Simple Use of ‘const’ The simplest use is to declare a named constant. C/Μάθημα 7ο - Βικιεπιστήμιο Ασχολούμενοι όλο και περισσότερο με τον προγραμματισμό θα διαπιστώσετε πως κάποιες εντολές γίνονται επαναλαμβανόμενες. Αν θέλαμε για παράδειγμα στο πρόγραμμα κρυπτογράφησης του προηγούμενου μαθήματος να δημιουργήσουμε ένα μενού όπου ο χρήστης θα επέλεγε ανάμεσα στις επιλογές κρυπτογράφησης και αποκρυπτογράφησης, με τις μέχρι τώρα γνώσεις μας, θα το κάναμε με μια δομή επανάληψης. Όμως αν στην συνέχεια θέλαμε να προσθέσουμε και άλλα μενού η δομή επανάληψης θα γινόταν περίπλοκη και χαοτική. Λύση σε αυτό το πρόβλημα δίνουν οι συναρτήσεις(functions) οι οποίες έχουν δύο σημαντικά πλεονεκτήματα: Απλοποίηση και ευκολότερη ανάγνωση του κώδικα,Αποφυγή του code duplication, δηλαδή να ξαναγράφεται ο ίδιος κώδικας περισσότερες από μία φορές. Έχουμε ήδη εξετάσει την συνάρτηση main().

Introduction à C++ 2011 (C++0x) Le mot-clé auto est un mot-clé utilisable en C++0x qui est différent du mot-clé auto qui était utilisé avant. Il est possible de le mettre à la place du type de telle sorte que ce type est automagiquement déterminé à la compilation en fonction du type retourné par l’objet utilisé pour l’initialisation. :magicien: On parle ici d’inférence de types. Free C / C++ Compilers and Interpreters C is a general purpose procedural programming language that is fairly easy to learn (in that it doesn't have many built-in features to memorize) but is nonetheless sufficiently expressive that it can be used to build any sort of computer program, including whole operating systems like Linux. C++ is a general purpose object-oriented programming language that was originally created as a superset of C (although nowadays the two languages have developed in different directions so that this is no longer strictly true). These two programming languages, C and C++, are probably among the most popular languages used to write programs. This page lists numerous free C and C++ compilers, cross-compilers and interpreters for a wide variety of operating systems on PCs, Macs and other computers. MinGW-w64 Like MinGW (listed elsewhere on this page), the MinGW-w64 project provides the libraries, headers and runtime needed for the GNU C and C++ compilers to run on a Windows system.

Preprocessor directives - C++ Documentation Preprocessor directives are lines included in the code of programs preceded by a hash sign (#). These lines are not program statements but directives for the preprocessor. The preprocessor examines the code before actual compilation of code begins and resolves all these directives before any code is actually generated by regular statements. These preprocessor directives extend only across a single line of code. As soon as a newline character is found, the preprocessor directive is ends. No semicolon (;) is expected at the end of a preprocessor directive.

Dynamic programming In mathematics, computer science, economics, and bioinformatics, dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems. It is applicable to problems exhibiting the properties of overlapping subproblems[1] and optimal substructure (described below). When applicable, the method takes far less time than naive methods that don't take advantage of the subproblem overlap (like depth-first search). The idea behind dynamic programming is quite simple. In general, to solve a given problem, we need to solve different parts of the problem (subproblems), then combine the solutions of the subproblems to reach an overall solution. Often when using a more naive method, many of the subproblems are generated and solved many times.

C/Μάθημα 6ο - Βικιεπιστήμιο Σε όλες τις γλώσσες προγραμματισμού υπάρχει η δυνατότητα ομαδοποίησης των δεδομένων ίδιου τύπου. Συμβατικά ονομάζουμε την δομή που προκύπτει πίνακα, θεωρώντας πως τα δεδομένα αποθηκεύονται σε γραμμές και στήλες αν και στην μνήμη η αποθήκευση γίνεται σειριακά. Αναφορά στον πίνακα γίνεται μέσω ενός ονόματος, όπως στις μεταβλητές, ενώ για τα δεδομένα ενός πίνακα χρησιμοποιείται το όνομα και ένας αριθμός που καθορίζει την θέση του στοιχείου μέσα στον πίνακα. c++ - Do the parentheses after the type name make a difference with new Roadmap for Metro style apps using C++ Here are key resources to help you get started with using C++ (including Visual C++ component extensions (C++/CX)) to develop Windows Store apps. This is not a comprehensive list of all of the features or available resources. Some topics listed below are specific to C++, and some are not specific to any single programming language. You can bookmark this page so that you can come back to it when you want to learn how to add another feature to your app.

Basics of C++ Namespace Forward: In this part of the series, I talk about the basics of C++ Namespace. By: Chrysanthus Date Published: 7 Feb 2013 Introduction

this is amazing post . thank you for sharing this awsomwe post .this is very helpfull. by brucemcphail Feb 25

Related:  C++ Livres et CoursTraining (C++)C++from here and thereProgramming