c review2 - CPE360 – Computational Algorithms and Data...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CPE360 – Computational Algorithms and Data Structures Using C++ in Visual Studio .NET by: Shant Stepanian ([email protected]) Topics Covered: The Standard Template Library in C++ Header file usage Using the Visual C++ Debugger File I/O Project and Solution Management Introduction The purpose of this lecture is to go over some fundamentals of C++ and Microsoft Visual Studio that will help you in this class and in the future. These topics are merely building blocks on what you will do, but it is also important to understand them. The end of this document has a list of links you can visit to help you further. I will start with an introduction on .NET. This is not critical to your understanding of C++, but you should why it is there. To sum what it is from my point of view, the .NET framework was created by Microsoft to allow the interconnection of components in an easy manner. You have seen many programming languages out there, from C++ to Java to Perl. Different people each have their own skillsets of languages that they know. However, it is hard for people to make components in each of these languages and connect them. This is one example of what .NET allows. Typically, when one compiles a language like C++, it is in the form of some language that is specific to a particular machine or operating system, another example being the bytecode in Java. .NET then features the Common Language Runtime (CLR), which is what all the languages featured in the framework, such as C++, C#, J#, and VB, compile to. Hence, components created in one class can connect to another. There are many more uses of .NET; this is just one of them. Check out the links below and search the web for any more information. STL: The using namespace std line explained Origin of STL What exactly is STL, and what is its point? First of all, STL stands for Standard Template Language. It was created as a part of C++ because C++ has object-oriented capability, while C does not. To quickly review object-oriented programming, it is when you can encapsulate some commands into what is called a class . For example, if you have used strings in C++, you would get the string length by calling the length() command using the dot operator like so: String a; a.length();. The length() method is defined as a part of the string class. This is very useful since we can define specific characteristics of a class. C did not have this functionality. If you recall, you would get the length of a string by calling the strlen() function. Instead of having a group of
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Figure 1 : std declarations a. Correct #include <iostream> using namespace std; void main() { //. .. b. Incorrect using namespace std; #include <iostream> void main() { //. .. c. Incorrect
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/25/2010 for the course CPE CPE 360 taught by Professor Jenniferchen during the Spring '10 term at Stevens.

Page1 / 10

c review2 - CPE360 – Computational Algorithms and Data...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online