Páginas

domingo, 1 de diciembre de 2013

Learning C++ Pointers for REAL Dummies

Introduction

Hello and welcome to "Learning C++ Pointers for REAL Dummies." This website was created by Paul DiLorenzo to fill the void of an easy understanding learning module for pointers.
Here are some rave reviews from people around the world:
  • "GOOD JOB with learning C++ pointers for dummies. Because of you I hope to get a 10 (that means A) at programming." Dan
  • "Sir, your tutorial on pointers is a masterpiece, I think you should continue writing more topics on C++." Mayur Jethwa

Pointers are a very difficult and troublesome area for most C++ programmers, beginners and intermediate alike. Most questions pop up about their use and why we even need them. I hope this website helps answer these questions for you and demystify the C++ pointer.
To understand pointers we have to understand how variables are stored. Variables are stored in memory cells inside the computer's memory. The computer's memory is made up of consecutive memory cells, a byte long, each with a unique address.
But we are not going to think in those terms. We are going to believe that computer memory is made up of a bunch of houses on one very long street. Thus, each house is a memory cell. Now, there must be a way for us to find this house. Well, in each house someone lives there. This person of course has a name and this will be our variable identifier. For example:
int paul;
This will put paul into a vacant house, of size int, somewhere along the street. We do not decide where paul will live. This is done by the operating system and the compiler at runtime. In a later section, we will discuss how to get paul to tell us where his house is.
Currently, paul does not have anything stored in his house. But, we all know that wouldn't be any fun to not store anything. So, each house can of course store a value. Continuing from above:
paul = 25;
This will store the value 25 into paul's house.
One last thing before we move into other topics. Let us remember thatpaul's house is a unique number in memory. In addition, if paul's house was numbered 1234 we know that his house is between houses 1233 and 1235. This is a very important concept for later sections.
This learning module is broken up into seven parts:
  1. Where do you live ( & ) - Explains what the address operator (&) is and how it is used
  2. What you got in your house (*) - Explains that the reference operator (*) is and how it is used
  3. Don't point, it's rude! - Explains how to declare variables that are pointers
  4. I am pointing here! Where are you pointing? - Explains how to initialize a pointer
  5. How do I point to the neighbor? - Explains how to move a pointer from one house to the next
  6. You guys are brothers? - Explains the relationship between arrays and pointers
  7. Beam me up Scotty, multiple times!!! - Explains how pointers can point to other pointers

Simple Array Tutorial in C++:

In this tutorial, I show you some basics about using Arrays in C++. Arrays are very simple when it comes to the basics and if you know it, you can get a lot done in a shorter period of time. The video takes you through some basics as well as shows you how it works as well as how to input and output data for arrays on the screen.

I will try to make another tutorial for Arrays where I go into using multiple array variables and output everything with and without sorting. It's very interesting and I hope you get to see it soon.

I hope you enjoy the video and if you have any requests feel free to let me know. Thanks for watching ! Thanks for watching and thanks for your supportand remember to subscribe!


lunes, 25 de noviembre de 2013

Friday November 22, 2013

Today was our finall day of labs and we had to send our fives last programs. To me, they were the most dificult of all. I spent a lot of time working on the problem four. That problem was the most I liked of all, because it was very similar to the software that the library utilizes. I do not had the time to finish all fives problems but at least I could send three of them.
Wednesday November 20, 2013

Today we have almost 3 hours of lectures and some of the things that we discuss were the final of chapter 8 and started discussing chapter nine. We discuss in chapter eigth about vectors that are like arrays that can change size, how can we declare it and how we can use them in our sourcescodes. But in order to use them we need to include the library of vectors that is  #include <vector>. We ended the chapter discusing about controlling vector capacity and later on we starter discusing the basics about pointers. How can we utilizes, what is a pointer, what is the purpose of a pointer and how we can trackt it alongside with our code.

Friday November 15, 2013

One of the things we discuss in class today was the ignore. That is a member of the istream class and it can be utilize to read and eliminated all characters. But it takes two arguments: The first oe is the maximum number of characters to discard and the second is the character that stops reading and discarding. Also I learn that comparison operators also can work with string objects  = = and  returns true if two string objects contain the same characters in the same order. We can also transforms strings in c++ to c-trings.

Wednesday November 13, 2013

We started to see the that the variables of type string can be assigned with the = operator to assigned them a string of words. But the constructor initializes the string to the empty string if you donot initialize the variable when you declare it. We also recall that the cin skips the whitespace   to find what it is to read then stops reading and the versions of getline stop reading at the end of line marker. Later all we ended with the lacture and I started workin with my lab 7.



Microsoft updates C++ compiler

Update lets Visual Studio support some aspects of C++11

By Joab Jackson
November 5, 2012 12:15 PM ET
IDG News Service - Microsoft is updating its C++ compiler for its Visual Studio 12 integrated development environment, or IDE, so that Windows application developers can use parts of the latest version of the programming language, C++11.
Friday afternoon, Herb Sutter, secretary of the ISO/ANSI C++ Standards Committee as well as a Microsoft platform evangelist, announced the release of the new batch compiler during a talk about the future of the language at the Microsoft Build conference, held in Redmond, Washington,
The company has released a compiler CTP (community technology preview) that supports some of the features in the latest C++, including variadic templates, uniform initialization and initializer_lists, delegating constructors, raw string literals, explicit conversion operators and default template arguments for function templates.
The release is the first of what will be a series of "out-of-band" releases, which periodically update the Visual Studio IDE with new features in between major releases, Sutter said. Microsoft will release additional C++ functionality in early 2013 in future out-of-band updates, Sutter said.
The CTP requires Microsoft Visual Studio 12 to run, though it can be run in a free version of the IDE, Desktop Express. Visual Studio 2012 built-in tools, such as Intellisense, debugger and static analysis do not yet support the new C++ features.
"We updated the batch compiler [but] the standard library has not been yet updated, so some of the new features that the standard library could use haven't been lit up yet," Sutter said. "That's just for the CTP. When we ship it, all those features will be in place."
Sutter said that while Microsoft CTPs tend to be pretty stable, it would not be advisable to use the compiler to produce production-ready programs.
As Sutter noted during his talk, there has been a lot of activity around the programming language of late. Microsoft, Intel, Google, IBM and other members of the C++ Committee have formed the Standard C++ Foundation, which will provide educational materials and encourage the correct use of C++ across different compilers.
The standard group has also commenced work on the next generation of the C++ language, C++17, due in 2017.
Developed in Bjarne Stroustrup in 1979, C++ brought object oriented features to the C programming language. It remains one of the most widely used programming languages, and is often used for large scale applications where performance is a critical factor. "We are built on C++, just as the whole industry runs on C and C++," Sutter said, referring to how much of Microsoft's latest operating systems, Windows 8 and Windows RT, was written in C++.
Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com