Hi Guys! welcome sa first tutorial natin sa C++ programming.
TOPICS:
-everything na makikita ninyo pag open ninyo ng IDE
What is an IDE?
- IDE stands for Integrated Development Environment. isa po itong user interface which makes it easier for us to code dahil mas madali mong makikita yung mga codes mo at meron ding suggestions. pwede ring mag run ng code dito. mering software, at meron ding online.
So, ano ang makikita natin na basic na codes sa C++.
online po na compiler gamit ko dito :You do not have permission to view the full content of this post. Log in or register now.
First is LINE 9: #include <iostream>
- ito po ay ginagamit sa pg load ng lahat ng laman ng library. "iostream" means "input/output stream" and it allows us to get data from the user(input) and to display something to the user(output).
LINE 11: using namespace std;
-it means use to use the namespace standard "std". ito po ay isang "class" that is used para sa commands ni C++. for example: cout<< ay ibig sabihin std::cout<<.
LINE 13: int main()
{
}
-ito po ay isang "function" at sa loob ng curly braces inilalagay yung codes naten. ang main function po ang unang function na eh rurun pg nag open tayo ng program naten. ang function ay isang group of codes that can be called by another function. meron po "int" dahil sa Integer ang main function natin. pg mg return na sya ng value na 0, it means tapos na ang program at mag eend na. further discussions about class and functions on the next thread.
LINE 15: cout<<"Hello Word";
- ahahaha d ko alam ba't ganito to lagi sa mga programming language. siguro a welcome sign sa "World of programming". cout<< means magpapalabas ng "String" o text ang program. always enclose strings with qoutation marks "".
Syntax:
cout<<"Hello World";
if we run this code, heto po yung output
NOTE: sa C++, it is always needed to put semicolon at the end of the block og codes except sa pag declare ng functions, class etc. see you sa next thread. comment for questions
TOPICS:
-everything na makikita ninyo pag open ninyo ng IDE
What is an IDE?
- IDE stands for Integrated Development Environment. isa po itong user interface which makes it easier for us to code dahil mas madali mong makikita yung mga codes mo at meron ding suggestions. pwede ring mag run ng code dito. mering software, at meron ding online.
So, ano ang makikita natin na basic na codes sa C++.
online po na compiler gamit ko dito :You do not have permission to view the full content of this post. Log in or register now.
First is LINE 9: #include <iostream>
- ito po ay ginagamit sa pg load ng lahat ng laman ng library. "iostream" means "input/output stream" and it allows us to get data from the user(input) and to display something to the user(output).
LINE 11: using namespace std;
-it means use to use the namespace standard "std". ito po ay isang "class" that is used para sa commands ni C++. for example: cout<< ay ibig sabihin std::cout<<.
LINE 13: int main()
{
}
-ito po ay isang "function" at sa loob ng curly braces inilalagay yung codes naten. ang main function po ang unang function na eh rurun pg nag open tayo ng program naten. ang function ay isang group of codes that can be called by another function. meron po "int" dahil sa Integer ang main function natin. pg mg return na sya ng value na 0, it means tapos na ang program at mag eend na. further discussions about class and functions on the next thread.
LINE 15: cout<<"Hello Word";
- ahahaha d ko alam ba't ganito to lagi sa mga programming language. siguro a welcome sign sa "World of programming". cout<< means magpapalabas ng "String" o text ang program. always enclose strings with qoutation marks "".
Syntax:
cout<<"Hello World";
if we run this code, heto po yung output
NOTE: sa C++, it is always needed to put semicolon at the end of the block og codes except sa pag declare ng functions, class etc. see you sa next thread. comment for questions
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.