Ask your own question, for FREE!
Mathematics 14 Online
OpenStudy (haseeb96):

Anyone can help me in learning C++ language ? from start?

OpenStudy (haseeb96):

@danish071996 @Nnesha @dan815 @iambatman @IrishBoy123

OpenStudy (irishboy123):

depends what you know already but you could do worse than find something free on Udemy. i've taken John Purcell's Java course on there and it was good.

OpenStudy (haseeb96):

Thanks

OpenStudy (anonymous):

haseeb did u knw Basic of C++

OpenStudy (haseeb96):

yeah little bit can u help me ?

OpenStudy (anonymous):

i don't knw much about C++. but wht i knw i can share with U.

OpenStudy (haseeb96):

i know how to write program in C++ but at a little extent . but i dont know more

OpenStudy (anonymous):

ohh.

OpenStudy (anonymous):

Structure of a program Variables and types Constants Operators Basic Input/Output.

OpenStudy (anonymous):

this are the basic of C++

OpenStudy (haseeb96):

okay

OpenStudy (anonymous):

iss k bare me pata hai.

OpenStudy (haseeb96):

yes

OpenStudy (haseeb96):

Ak martaba Structure of Program aur variables and its types ko explain kar du

OpenStudy (anonymous):

The best way to learn a programming language is by writing programs. Typically, the first program beginners write is a program called "Hello World", which simply prints "Hello World" to your computer screen. Although it is very simple, it contains all the fundamental components C++ programs have:

OpenStudy (anonymous):

// my first program in C++ #include <iostream> int main() { std::cout << "Hello World!";

OpenStudy (anonymous):

panel above shows the C++ code for this program

OpenStudy (anonymous):

1// my first program in C++ 2#include <iostream> 3 4 int main() 5 { 6std::cout << "Hello World!"; 7}

OpenStudy (anonymous):

Line 1: // my first program in C++ Two slash signs indicate that the rest of the line is a comment inserted by the programmer but which has no effect on the behavior of the program. Programmers use them to include short explanations or observations concerning the code or program. In this case, it is a brief introductory description of the program.

OpenStudy (anonymous):

Line 3: A blank line. Blank lines have no effect on a program. They simply improve readability of the code. Line 4: int main () This line initiates the declaration of a function. Essentially, a function is a group of code statements which are given a name: in this case, this gives the name "main" to the group of code statements that follow. Functions will be discussed in detail in a later chapter, but essentially, their definition is introduced with a succession of a type (int), a name (main) and a pair of parentheses (()), optionally including parameters. The function named main is a special function in all C++ programs; it is the function called when the program is run. The execution of all C++ programs begins with the main function, regardless of where the function is actually located within the code. Lines 5 and 7: { and } The open brace ({) at line 5 indicates the beginning of main's function definition, and the closing brace (}) at line 7, indicates its end. Everything between these braces is the function's body that defines what happens when main is called. All functions use braces to indicate the beginning and end of their definitions. Line 6: std::cout << "Hello World!"; This line is a C++ statement. A statement is an expression that can actually produce some effect. It is the meat of a program, specifying its actual behavior. Statements are executed in the same order that they appear within a function's body. This statement has three parts: First, std::cout, which identifies the standard character output device (usually, this is the computer screen). Second, the insertion operator (<<), which indicates that what follows is inserted into std::cout. Finally, a sentence within quotes ("Hello world!"), is the content inserted into the standard output. Notice that the statement ends with a semicolon (;). This character marks the end of the statement, just as the period ends a sentence in English. All C++ statements must end with a semicolon character. One of the most common syntax errors in C++ is forgetting to end a statement with a semicolon.

OpenStudy (anonymous):

http://www.cppinstitute.org/?page_id=74

OpenStudy (anonymous):

http://www.cplusplus.com/doc/tutorial/

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!