C++ (Lesson 1)

Posted by Black Magic | Posted in | Posted on 2:32 AM

Programming ေတြကုိ.. ဘယ္ကေနဘယ္လိုေလ့လာရမယ္ဆိုတာ.. ရွင္းၿပခဲ့ပါတယ္။ ဒီေန႔ကေနစၿပီး.. အေၿခခံၿဖစ္တဲ့.. C++ programming ကို.. သင္ၾကာေပးသြားမွာၿဖစ္ပါတယ္။
အရင္ဆံုးလိုအပ္တဲ႔ software ေတြကို Download ခ်လိုက္ပါေနာ္။
Download Turbo C for XP
Download Turbo C for Windows 7

- Download ဆြဲလို႔ရလာတဲ့.. zip file ကုိၿဖည္လိုက္ပါ..။
- Turbo C ဆိုၿပီး.. file တစ္ခုေပၚလာပါလိမ့္မယ္..။ အဲ့ထဲမွ.. INSTALL.EXE ကို.. ဖြင့္လိုက္ပါ..။ Install လုပ္သြားပါလိမ့္မယ္.။
- ဘယ္မွာထားမလဲဆိုၿပီး..ေမးရင္.. C: or D: ၾကိဳက္တာထားလို႔ရပါတယ္..။ box ေလးေတြ..အဆင့္အဆင့္တတ္လာပါလိမ့္မယ္..။ Enter ကုိသာ.ႏွိပ္သြားပါ..။
- Installation ၿပီးသြားရင္.. တကယ္လို႔.. C ေအာက္မွာထားခဲ့ရင္.. C:\TC\BIN\TC.EXE ကုိသြားဖြင့္လိုက္ပါ..။ D ေအာက္မွာဆုိရင္ေတာ့...  D:\TC\BIN\TC.EXE မွာရိွပါတယ္.။
- Screen အၿပာေရာင္နဲ႔..တတ္လာပါလိမ့္မယ္..။ တကယ္လို႔...သင့္ကြန္ပ်ဴတာက.. မႏိုင္ခဲ့ရင္.. "This system does not support fullscreen mode. Choose 'Close' to terminate the application" ဆိုၿပီးတတ္လာပါလိမ့္မယ္..။ Fullscreen မၿပႏိုင္လို႔..တတ္လာတာပါ..။ ဘာမွမၿဖစ္ပါဘူး..။ Ignore ကိုသြားေရြးလိုက္ပါ.. ^_^
- software design ကေတာ့.. မလွပါဘူး..။ cmd လိုပါပဲ..။ အၿပာေရာင္ screen မွာ.. code ေတြေရးရတာပါ..။ ေလာေလာဆယ္ေတာ့.. program ေရးနည္းအေၾကာင္း.. အရင္ေၿပာလိုက္ၾကရေအာင္ေနာ္..  :)

Structure of C++ program
 1. header file
 2. main program

Format
#include< header file >
void main( )
{
   program statement;
}

header file ေနရာမွာ.. ဘာေရးရလဲဆိုရင္.. iostream.h ပါ..။
iostream.h ဆိုတာ.. ဘာကိုဆိုလိုတာလဲဆုိရင္.. Input Output Stream.Header ကိုေၿပာတာပါ..။

output ကုိ.. C++ မွာ..ဘယ္လိုထုတ္လဲဆိုရင္..
~ user ရိုက္ထည့္ခ်င္တာေတြကို.. cin>> နဲ႔လက္ခံပါတယ္.။
~ user က..ကြန္ပ်ဴတာ screen ေပၚမွာ.. ၿပခ်င္တာေတြကုိ cout<< နဲ႔ထုတ္ပါတယ္.။

what are cin and cout?
~ cin ဆိုတာ.. Console Input ပါ။
~ cout ဆိုတာ.. Console Oupt to the monitor screen ကုိ..ေၿပာတာပါ..။
>> means  "Right Shift Assignment"
<< means  "Left Shift Assignment" လုိ႔ေခၚပါတယ္..။
ဒါေတြက.. အေခၚအေ၀ၚအသံုးအႏွဳန္းေတြပါ..။ သိထားရင္ေတာ့..အေကာင္းဆံုးပါပဲ.. ^_^

ေနာက္ဆက္လက္ေရးသားမယ့္.. lesson ေတြကုိ.. အားေပးၾကပါဦးလို႔ေၿပာၾကားရင္း.. ဒီေန႔ေတာ့.. ဒီေလာက္နဲ႔ပဲေတာ္လိုက္ၾကရေအာင္ေနာ္... ^_^
-
-
-
-Credit to $U Y4T4N4R

Comments (0)

လိုခ်င္တာရွိရင္ေအာ္ခဲ့ေနာ္ !

Don't Forget to Like & Follow

Daily Email Updates
Subscribe to Get Latest Updates Free


Check IP

IP
ask4linksask4pc

ကၽြန္ေတာ့ Blog မွာ ဘာကို အဓိကတင္ေစခ်င္လည္း?

ယေန႔ေငြလဲႏႈန္း

DMCA.com Protection

Powered By:

Black Magic © 2013 - All Rights Reserved.